hi i am having a table say operations with fields - id,name,description ,
now i want to create another table roles with fields id,name ,permitted_operations and in permitted_operations field there should be a List<Operations> what should be the datatype of field permitted_operations.
posted 5 years ago
To me it looks like more a database design issue.
In your case I would just have a
-ROLE table with ID, NAME columns
-OPERATION table with ID, NAME, DESC columns
-ROLE_OPERATION table with ROLE_ID,OPERATION_ID. Both columns being foreign keys to ROLE and OPERATION table.
And with the appropriate mapping (many-to-many) you will have your java field with a List<Operation>