indexedBy behavior.

2 views
Skip to first unread message

sledorze

unread,
Jul 29, 2009, 7:57:59 AM7/29/09
to Fénix Framework
I wonder how will react the new implementation of relations (providing
lazy loading) regarding the indexedBy functionnality in the context of
a non setted index value.
Will it still be valid (ie not crash)? How would it behave?
Thanks!
Stephane

Sérgio Silva

unread,
Jul 30, 2009, 10:39:37 AM7/30/09
to Fénix Framework
Hello!

If you want to use indexed relations the index key class must be a
ValueType and it must also be Comparable. If it is a primitive type
such as Integer, String, etc you don't have to worry about it (since
it is Comparable by default)
Every participating object which field will be used as key of the
indexed relation, must have the value setted and can not be null,
though I think would be interesting to use null itself as the key for
non-setted fields.

Thanks letting me know about this special case,

Regards,
Sérgio
Reply all
Reply to author
Forward
0 new messages