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