How to index a class
Hi
I have two persistent classes defined. Lets call it Parent and Child.
Child class is one of the property of Parent Class.
I would like to define a index on Child class.
So what is the default behaviour I defined a index on a non simple data type member?
Any possibility that I could customized the behaviour ? For example. Child class has three properties.
Could I configure the index to index any combinations of these three properties?
Thanks for your help.
Comments
It depends on a queries you want to run. For example you want to get all parents' ids which have a child with a specific property value. In a child class you can index for one or several properties, and execute this query:
SELECT parentId FROM child WHERE propertyA = 'value'
Or you can define a computed property in your parent class and index that.