What database are you using? (normally it's not possible to have a FK which does not reference a PK) For information, link generation will be configurable in the upcoming version (2 parameters in databases.yml : linksManyToOne and linksOneToMany = true/false)
Thank you for the answer. It is a MS SQL database. The tables are also defined somewhat untypically. Instead of referencing the actual PrimaryKey, each one references a different unique key: CREATE TABLE Account ( AccountCategoryCode int NULL, AccountId uniqueidentifier NOT NULL, ItemID int IDENTITY(1,1) NOT NULL, CONSTRAINT Account_PK PRIMARY KEY (ItemID) ); CREATE UNIQUE NONCLUSTERED INDEX IX_Account_AccountId ON Account ( AccountId ASC ) ON [PRIMARY ] ; CREATE TABLE Contact ( ItemID int IDENTITY(1,1) NOT NULL, AccountId uniqueidentifier NULL, ContactId uniqueidentifier NULL, CONSTRAINT Contact_PK PRIMARY KEY (ItemID), CONSTRAINT Contact_Account_FK FOREIGN KEY (AccountId) REFERENCES Account(AccountId), ); CREATE NONCLUSTERED INDEX IX_Contact_AccountId ON Contact ( AccountId ASC ) Unfortunately I am not the database owner. Therefore I have only limited possibilities. When will the next version of Telosys CLI be released?
Telosys-CLI ver 4.1 will be released in July
I have now tested it with version 4.1 and the settings in databases.yml (linksManyToOne and linksOneToMany = true/false). Unfortunately I still get the message ".... FK error : 'xxx' is not an ID/PK attribute in entity 'yyyy'". Is there any way to not generate the @FK attributes when exporting from the database model? Without it would work.