Embedded Objects Question #3146
-
Hi Now if I start without doing the coalesce() call and always return both embedded objects it works where I get one null object and one populated. Basically I'd like my API view to set a single id using coalesce() and have the single associated embedded object be returned so that my API does not have to define a property for both ids since at least one is always null. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
Hi. So, is it something like:
And one or the other will be null? I think that this can be solved by using Computed Relationships. You can add the Try it out to see if it works, if you need help building it, share a simple DDL example to reproduce the issue. |
Beta Was this translation helpful? Give feedback.
Hi. So, is it something like:
And one or the other will be null? I think that this can be solved by using Computed Relationships. You can add the
COALESCE(id1,id2)
to theWHERE
filter inside the function.Try it out to see if it works, if you need help building it, share a simple DDL example to reproduce the issue.