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 found and Error when draging on a child table of a table with a string primary key
Exception while processing Server Explorer drag: System.NullReferenceException: Object reference not set to an instance of an object. |
|
|
Hi MiddleTommy, Out of interest, are you using the latest nightly build? Thanks, John-Daniel Trask |
|
|
I am using 20080829 |
|
|
Hi Middle Tommy, Could you attach (or email if it's sensitive) the schema file for your database and we will test this to see if we can resolve the issue. Kind regards, John-Daniel Trask |
|
|
I did a mock up of the 3 tables. It is a many to many relation but I didnt try to set it up that way because I know it is not supported in the modeler I dont think it is a string key issue after furthur testing. I think it is dragging a table on that is associated inbetween two tables(that already are in the model). in this case it is a ThroughAssociation. My original Problem was not a through association it just happend to be a middle table in a hierachy By Schema file which one do you mean. one form MS-SQL or from Lightspeed? maybe with this new insight you can reproduce the problem if not let me know which file you are after |
|
|
Just the SQL for creating the table structure - that way we can fire it up and drag the tables on. That way we can be sure that we're talking about the same issue. Thank-you, John-Daniel Trask |
|
|
I emailed over some files |
|
|
The problem appears to be with our handling of the case where the foreign key column does not have the Id suffix (e.g. one of the tables that was giving you trouble had a foreign key column called Type rather than TypeId). I have committed a candidate fix for this which will be in tonight's nightly build (20080906), available from about 1800 GMT. Note that the resulting change to the generated classes may be a little bit confusing: e.g. your .NET class will have a Type property, but this is the association, not the Type column data (the foreign key value); the Type column data itself will be represented by a property called TypeId (with a ColumnAttribute mapping it to the Type column). Note also you will want to get rid of some existing properties in your .lsmodel because their job is actually handled by the association. This also fixes the issue with the schema round-tripping wanting to add associations when they already existed, which you mentioned in your email. Thanks for reporting these issues and for helping us to reproduce them, and please let us know if you still see problems in this area. |
|