This question is locked. New answers and comments are not allowed.
Hello,
Whenever I try to define such association, I get the following error message :
The source class of the 'MediaHasUpload' 1:1 association uses backend calculated identity. This is not allowed because the foreign key value should be obtained from the identity of the target class. Consider defining the association in the opposite direction.
(Both classes have a DatabaseServerCalculated identity)
Basically what I'm looking for is to have a 'Media' class with a DatabaseServerCalculated identity, the 'Media' can have an 'Upload' class property that can be null. I've tried to set the 'Upload' identity to DatabaseServerCalculated so it gets created for me but then that error is triggered.
How can such association be defined, if possible at all ? If not, what would be the closest compromise to it ?
Thank you
UPDATE
I fixed it -> using a GUID instead it's working now !
Whenever I try to define such association, I get the following error message :
The source class of the 'MediaHasUpload' 1:1 association uses backend calculated identity. This is not allowed because the foreign key value should be obtained from the identity of the target class. Consider defining the association in the opposite direction.
(Both classes have a DatabaseServerCalculated identity)
Basically what I'm looking for is to have a 'Media' class with a DatabaseServerCalculated identity, the 'Media' can have an 'Upload' class property that can be null. I've tried to set the 'Upload' identity to DatabaseServerCalculated so it gets created for me but then that error is triggered.
How can such association be defined, if possible at all ? If not, what would be the closest compromise to it ?
Thank you
UPDATE
I fixed it -> using a GUID instead it's working now !