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
|
This is probably a dumb question, but how can I set a CLR Attribute on a Through Association using the graphical editor? I'd like to serialize the collection into JSON, and it works fine if I add the attribute manually, but of course this gets overwritten when I save it in the editor. I was thinking about adding an arbitrary attribute to one of the Entities, then using that as a flag in the vm "template", but I figured I'd ask. Is serializing a Through relationship in this manner even suggested? Thanks! |
|
|
I am assuming you are intending to ship and then deserialize this information for some distributed scenario in which case you may want to look at using a DistributedUnitOfWork instead, however if you feel its appropriate to do this manually there is no particular problem with serializing ThroughAssociations, just keep in mind that you will want to ensure the associations are loaded prior to serialization to avoid any lazy load issues on the remote end. To add the attribute make sure you are using an explicit ThroughAssociation on your model (rather than an auto one, so the through entity should be present on your model) and then right click on the two associations leading into the Through entity and specify the attribute in the properties on the association.
|
|