Displaying attribute from child entity

Hi,

What is the best way to solve this scenario?

  • I have a parent entity A with child entities B, C.
  • I want to display a list of all these entities in a table with some attributes from B and C as well

I tried creating a datasource pointing at A but I get the detached object error when trying to access attributes from B, C.

Thanks.

Check the view you are using for your A datasource. The view specified needs to contain B and C as well as all of the attributes from B and C that you want to display.

Hi Weston,

Let me clarify, say I have another entity called ‘Master’ with a one-to-many link to A. So the reference is only against the Entity A, not to B and C. So, how do I go about exposing the attributes of B and C to Master? I have a view in Master but I do not / cannot see the attributes of B, C.

Hope this makes sense.

If you have one-to-many reference from Master to A and many-to-one references from A to B and C, you should be able to select in a Master view first A attribute and then its B and C attributes. Or first define a view for A containing B and C (say a-view), and then select this view for A attribute in the Master view.