Problems with multiple primary keys using ORMLITE

asked10 years ago
last updated7 years ago
viewed409 times
Up Vote0Down Vote

I use the ORMLite Poco generator for my database.

The problem is that I have a table with multiple primary keys, and when I try to add any data into the database I get unique constraints.

I have read that I use @DatabaseField (uniqueCombo = true) but I have no idea where to add that. Please help me

This is my code in Poco class generator and all of the fields below are part of the primary key.

tables["FieldLookupGroupFieldLookup"].Ignore = false;
tables["FieldLookupGroupFieldLookup"].ClassName = "CustomFieldGroupRelation";
tables["FieldLookupGroupFieldLookup"]["FieldLookupId"].PropertyName="CustomFieldValueId";
tables["FieldLookupGroupFieldLookup"]["ApplicationId"].PropertyName="CompanyId";
tables["FieldLookupGroupFieldLookup"]["FieldLookupGroupId"].PropertyName="GroupId";