@ForeignCollectionField(eager = false) private ForeignCollection<Order> orders;
NOTE: If the collection has been marked as being "lazy" then just about all methods in this class result in a pass through the database using the {@link #iterator()}. Even {@link #size()} and other seemingly simple calls cancause a lot of database I/O. Most likely just the {@link #iterator()}, {@link #toArray()}, and {@link #toArray(Object[])} methods should be used if you are using a lazy collection. Any other methods have noguarantee to be at all efficient. Take a look at the source if you have any question.
NOTE: It is also important to remember that lazy iterators hold a connection open to the database which needs to be closed. See {@link LazyForeignCollection#iterator()}.
@author graywatson
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|