Many-to-Many issue with v3.5

Posts   
 
    
kooshka
User
Posts: 39
Joined: 14-Mar-2013
# Posted on: 02-Apr-2013 14:58:26   

I'm upgrading from v2.6 to v3.5 and i'm getting an error that didn't occur on v2.6

I have this M2M relation:

Roles.ID <- RolesTablePrefixes.RoleID TablePrefixes.ID <- RolesTablePrefixes.TablePrefixID

And right after I do a "Reverse-engineer Tables to Entity Definitions" I get this error:

"The entity 'UsersRole' is mapped onto the target 'myDatabase.UserRoles' however 'UsersRole' doesn't have any identifying fields set, while the target is a table. When an entity is mapped onto a table, it requires at least one identifying field."

I have my PK/FK relationships set on the database, what else do I need to do to fix this error?

Otis avatar
Otis
LLBLGen Pro Team
Posts: 39910
Joined: 17-Aug-2003
# Posted on: 02-Apr-2013 15:12:10   

the intermediate table userrole does have a PK defined? If so, do you have the preference IdentifyingFieldsFollowDBPrimaryKeyConstraints set to false? If so, is the equivalent in project settings also false or default? Then that's the reason. You can also manually set the PK of the entity btw, simply select the fields in the project explorer and right-click to mark them as identifying fields.

Frans Bouma | Lead developer LLBLGen Pro
kooshka
User
Posts: 39
Joined: 14-Mar-2013
# Posted on: 03-Apr-2013 09:19:35   

Fixed. Thanks Otis wink