Many-to-Many and DevExpress

Posts   
 
    
kooshka
User
Posts: 39
Joined: 14-Mar-2013
# Posted on: 25-Apr-2013 12:35:57   

I have a M2M relation, Roles-RolesPrefixes-Prefixes, and when I set a DevExpress GridControl datasource to the RolesPrefixes entityCollection I get 4 columns instead of 2.

I was expecting columns RolesId and PrefixesId, but I also get a Roles and Prefixes columns of types RolesEntity and PrefixesEntity.

Is this an LLBLGen issue or a DevExpress one? Can you help to fix it?

Thanks

kooshka
User
Posts: 39
Joined: 14-Mar-2013
# Posted on: 25-Apr-2013 14:02:42   

Looking at the returned collection, the items do have the 4 properties, it looks like it's an llbl issue then.

Is there some settings I need to do that I'm missing?

kooshka
User
Posts: 39
Joined: 14-Mar-2013
# Posted on: 25-Apr-2013 15:20:46   

Not sure this is the best procedure, I fixed it by creating a view to that table, now I get only the 2 columns as expected.

It would be nice to know if there is a better way to do this.

Thanks

Walaa avatar
Walaa
Support Team
Posts: 14995
Joined: 21-Aug-2005
# Posted on: 25-Apr-2013 21:43:21   

These properties are navigators to the related entities. You can remove these extra properties from the Grid, can't you?

You can also set Browsable attribute to false on these properties. [Browsable(false)]

Anyway, I guess you are using an old outdated version. Which RTL version (build no.) are you using?

kooshka
User
Posts: 39
Joined: 14-Mar-2013
# Posted on: 26-Apr-2013 10:42:12   

Hi Walaa,

do you mean the llbl version? I'm using v4.0

Setting the Browsable property worked just fine smile