This thread looks to be a little on the old side and therefore may no longer be relevant. Please see if there is a newer thread on the subject and ensure you're using the most recent build of any software if your question regards a particular product.
This thread has been locked and is no longer accepting new posts, if you have a question regarding this topic please email us at support@mindscape.co.nz
|
Hi, I have (in PostgreSQL) a table "Library" that has a primary key of type string named "library". I have a second table "LibrarySummary" that has a primary key of type string named "library". The two tables should really be one, but that's another story. Neither the Library nor the LibrarySummary table has a foreign key linking them, as their common primary keys can be used to do so. I have created (in the LightSpeed designer) a one-to-one association from Library to LibrarySummary. I set the "Column Name" property of the association to "library", and changed the "Target Name" from the default "LibrarySummary" to "Summary". I get a LightSpeedException:
The inner exception is:
The stack trace is:
I am using LightSpeed 4.0.646.18138. I assume this has something to do with the Library table lacking an explicit FK to the LibrarySummary key, but I don't know how to set this up in LightSpeed. thanks! |
|
|
Hi Derek, You need an explicit backing field for the the one to one association to store its data in, so setting this up as an association in the model is not going to work. You can however just set this up as a manual property in your partial class e.g. on your Library class you could declare:
And then set up the reverse of that on LibrarySummary.
|
|