Hello,
I have a question on defining relations in the LLBLGen designer (version 4.2)
Imagine working with a legacy database (SQL server) where there are no foreign keys defined between entities, but is instead using a concept of
"functional keys". For instance, the database could have a table "Users" where each user has some fields, and the combination of
firstname/lastname/dateofbirth is "unique" and used as a functional key.
Then everywhere where the user is referenced, instead of using a foreing key UserId, the functional key is in place.
So an Order entity would have a Userfirstname/userlastname/userdateofbirth to identify the user.
User
UserId
Firstname
LastName
DateOfBirth
Address
etc...
Order
OrderId
UserFirstName
UserLastName
UserDateOfBirth
OrderNumber
OrderQuantity
etc...
Is it possible, in the LLBGen designer, to define a relation between UserEntity and OrderEntity, specifying the fields of the functional
key as "foreign key" ? In that way that a UserEntity has a "Orders" property, and also a correct PrefetchPath is generated.
All this WITHOUT changing the database schema ! (otherwise it would of course be simple to just add a UserId FK to the Orders table)