No, there is no JPA equivalent. You can find out if the object is loaded , and use one of the two parameters, or access to the properties while the object is still tied to the persistence context, which I usually see the calling size, only to initialize the collection
myEntity.getListOfThings().size();
or use the query to initialize.
source
share