Find with primary key and nested attribute #366
-
I noticed that if I am using a primary key with a nested attribute as a property, and I try to do a find using just that property value, what happens is that onetable constructs the key expression just fine, but it adds a filter expression that looks for an exact match of the nested object with just the primary key property. Is there a way to have find exclude that filter expression and just do a search on the key? Example: Schema:
This returns an empty array:
This is the query generated:
Update: I see now that the filter expression is always added with find, even when the key attribute is at the top level. Of course at the top level the filter expression works, since there are no nested properties. |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 1 reply
-
You could try a where expression. Those support dotted properties in the expressions. |
Beta Was this translation helpful? Give feedback.
-
I tried this - but it throws an error:
|
Beta Was this translation helpful? Give feedback.
You could try a where expression. Those support dotted properties in the expressions.