views:

15

answers:

1

Hi all,

I have a self defined entity in RIA service called EntityA. It contains a EntityCollection of EntityB. I use three attributes on it.

[Include]
[Composition] [Association("EntityA_EntityBs", "ID", "ID")] public EntityCollection EntityBs { get; set; }

Looks like the generated file (...g.cs) get all properties and also the collection, and the service indeed gets child collection attached when return. However, the client just has properties retrived without any child entities.....

I am wondering what I did wrong?

Thank you all

A: 

OK, I solved it.

It's caused by the association attribute. It should have the correct information:

[Association("EntityA_EntityBs", "ID", "EntityA_ID")]