Hello:
I have created two entities named branch and cloth, and the relationship between them is many-many, now I have provided two different views one for admin and a very limited view for the user, but while creating user view, I need to access the attribute of that many-many relationship table but I am not getting the access to that table. So How can I access the attribute of the automatically created many-many relationship table.
Hi:
I am sorry, I cannot share my sample project with you as it is confidential, but let me try to explain you the whole scenario that what actually I am trying to do.
I have created two entities, following are the details of both the entities:
ageGroup String AGE_GROUP
category Category [ammsnew$Category] CATEGORY_ID
admin Admin [ammsnew$Admin] ADMIN_ID
branch Branch [ammsnew$Branch]
model FileDescriptor [sys$FileDescriptor] MODEL_ID
status Boolean STATUS
And I set the M-N relationship between these two entities and in a result Cuba Platform automatically generated a new table named “AMMSNEW_CLOTHES_BRANCH_LINK”.
In “Clothes” Entity, following information is available related to table “AMMSNEW_CLOTHES_BRANCH_LINK”:
Now I am providing different views to different users in which I have to show clothes which are related to a particular branch, to achieve this, I need to access the automatically generated table named “AMMSNEW_CLOTHES_BRANCH_LINK”, but I am unable to access the attributes of this table.
So can you please tell me that is there any way to access the attributes of auto generated table “AMMSNEW_CLOTHES_BRANCH_LINK”.
Please, create the view for the Branch entity as it is shown in the picture and add the many-to-many relation to this view:
After that these referenced entities will be loaded from the database and you will be able to access them either using JPQL or Java code. You don’t need to access the auto-generated table.
Hi:
Actually I am trying to create roles and access groups and when I am applying constraints on it, there I need that attributes. Below is the screen shot of this: