Hi I am adding a db annotation to a type of mine.
I want a new filed that gets data from another type (external), it filters and counts unique values of a specific field.
Lets call my type Pod and lets call the type from which I need to get data FullPod. This is what I get:
@db(order='descending(endDateRefM1), descending(beginDateRefM1)', filter = '(endDateRefM1 == "9999-12-31T23:59:59.000") && (endDateRefM2 == "9999-12-31T23:59:59.000")', include: 'podM2') podFullPod: [FullPod](id) numChildren: int stored calc "count(unique(podFullPod.podM2))"
So I created a field podFullPod that, using the annotation, does the “join” between Pod and FullPod. I would expect that what it gets there is an object of ids and of a field called podM2 (since there is an include in the annotation), but It returns only an array of ids.
In the other field (numChildren) I want to do a count of unique values of podM2, but since podFullPod does not contain podM2, the unique count that I get back is wrong.
Did I miss something? How do I force the include?
The version of the platform I am using is 7.8
Sorry for the confusion, but there was some escape character. Now the my code it is fixed and maybe makes more sense: I want to furthermore add that the type FullPod
Hopefully it makes more sense.