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've had some trouble with some one to one associations on my model and narrowed it down to a test case (attached). I have only had time to test it through a Dynamic Data (3.5 SP1) website so I'm not certain if the behaviour is specific to that model access route. There are just two Entities, Person and Something and a one to one relationship between the two. This relationship is nullable in both directions. So a Something can exist without an associated Person and vice-versa. Obviously not a very useful model in itself but when other entities are attached to each of these it does become a critical (albeit optional) relationship in my full model. If you run the DD website you'll see that attempting to create a Something with no associated Person throws an exception. (Or it may be a Person with no Something, I can't remember but the point is that it works in one direction but not the other). What have I done wrong? Thanks, Chris PS: The DD .NET 3.5 SP1 release doesn't seem to offer an option of a null relationship once there is an entry in the database table. I'm not sure if that's a limitation of DD or the meta model that LightSpeed sends it? The DD Futures release does provide this feature and it now throws a validation error (something like "association can't be null") instead of sending the null data to LightSpeed. Maybe that is just a different symptom of the same problem or maybe it's something else entirely such as a DD Futures bug. |
|
|
Just to update you on this, we have confirmed that this is a LightSpeed issue and I think we have a fix. However, it has been a bit more complex than we'd hoped, so it won't be in tonight's nightly build. It should be in the one after that -- I will keep you posted. |
|
|
Hello Chris, I have committed a candidate fix for this. You should now be able to create entities with or without associations, and you should see a Not Set item in the association drop-down that will allow you to clear an existing association. The fix will be in the 1 August nightly build, available from about 1430 GMT. Please let us know whether this addresses the problem in the real app -- it is working okay for us in your simple repro example but it is possible that a more complex environment will turn up some issues we have overlooked. |
|
|
This seems to have worked. I'll let you know if any more complex modelling causes any problems in future. Thanks, Chris |
|