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
|
I am facing problem is with foreign key columns, LightSpeed doesn't display these columns in the entity in model. While inserting or selecting records, it gives an error for each foreign key fields like -invalied identifire. Can anybody explain me how we can assign value in foreign key value while inserting a new record? for example:
When we drag all three tables in the model, there won't be any column displaying in Class entity and when we try to insert a new record into Class we are able able to assign value in Student_ID and Teacher_ID but when make save changes then it will generate error like-
\"Student_ID\": invalid identifier Can you please explain me how we can solve this issue? |
|||||||||||||||||||||||||||||||||||||||||||||
|
|
Hi, You can set the name of the column used by a FK by clicking on the association connection and then setting the column name attribute. LightSpeed doesn't show the FK field on the entity because it would be redundant. I've attached a picture of what to click on the designer to help out - see if that resolves your issue. Please let us know if that does not solve it for you. John-Daniel Trask |
|
|
Also, the CLR property will always be named XxxId where Xxx is the name of the association, e.g. StudentId rather than Student_ID. (As JD says, you can still map this to the Student_ID column, but you can't change the property name.) |
|