|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: REQUIRED | OPTIONAL | DETAIL: ELEMENT |
@Target(value=FIELD) @Retention(value=RUNTIME) public @interface ForeignCollectionField
Annotation that identifies a ForeignCollection
field in a class that corresponds to objects in a foreign
table that match the foreign-id of the current class.
@ForeignCollection(id = true) private ForeignCollection<Order> orders;
Optional Element Summary | |
---|---|
String |
columnName
The name of the column. |
boolean |
eager
Set to true if the collection is a an eager collection where all of the results should be retrieved when the parent object is retrieved. |
String |
foreignColumnName
Deprecated. This has been renamed as foreignFieldName() to make it more consistent to how it works. |
String |
foreignFieldName
Name of the _field_ (not the column name) in the class that the collection is holding that corresponds to the collection. |
int |
maxEagerForeignCollectionLevel
Deprecated. Should use maxEagerLevel() |
int |
maxEagerLevel
Set this to be the number of times to expand an eager foreign collection's foreign collection. |
String |
orderColumnName
The name of the column in the object that we should order by. |
public abstract boolean eager
NOTE: If this is false (i.e. we have a lazy collection) then a connection is held open to the database as
you iterate through the collection. This means that you need to make sure it is closed when you finish. See
LazyForeignCollection.iterator()
for more information.
WARNING: By default, if you have eager collections of objects that themselves have eager collections, the
inner collection will be created as lazy for performance reasons. If you need change this see the
maxEagerLevel()
setting below.
@Deprecated public abstract int maxEagerForeignCollectionLevel
maxEagerLevel()
public abstract int maxEagerLevel
public abstract String columnName
Dao.getEmptyForeignCollection(String)
or when you want to specify it in
QueryBuilder.selectColumns(String...)
.
public abstract String orderColumnName
@Deprecated public abstract String foreignColumnName
foreignFieldName()
to make it more consistent to how it works.
public abstract String foreignFieldName
WARNING: Due to some internal complexities, this it field/member name in the class and _not_ the column-name.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: REQUIRED | OPTIONAL | DETAIL: ELEMENT |