nobody
nobody

Reputation: 1949

Knowing the size of Lazy loaded collection

Is there any way to know the size of a lazily loaded collection without loading the collection object(without writing a @NamedQuery with COUNT(*)) ?

Something like @LazyCollection(LazyCollectionOption.EXTRA) in hibernate ?

Note : I'm using JPA 2.0(EclipseLink)

Thanks

Upvotes: 1

Views: 336

Answers (1)

James
James

Reputation: 18379

No, size will instantiate the relationship. You need to issue a query to get the size if desired.

Upvotes: 2

Related Questions