Friday, February 10, 2012
Support » Support Forum
Register Login
HomeWhat is NDO?- Executive Overview- NDO for DevelopersHow NDO Works- Persistent Classes- Mapping- Queries- Reverse Engineering- Inheritance, Polymorphism- Distributed ApplicationsLicensingSupport- Support Forum- FAQ- Solutions- Downloads- E-Mail Support- Tutorial VideosOnline ShopContact
Welcome to the NDO support forum!
Please register/login at the site if you want to post a thread. We sometimes copy support mails of common interest to the forum. They appear with anonymous sender. Please post your messages in English language if possible. You can do your posts also in German, we will translate your post and our answer so that all users of the forum can read your posts. The forum software requires that javascript is enabled. Please do not insert licence information or licence keys in forum posts. If you know a good answer to a post of another user, feel free to reply! The forum is monitored. We reserve the right to remove posts we consider not to be useful for other forum users.
Hi Michael,
sorry for the late answer! I moved to another flat and that caused a lot of work.
If you write such a class, use a bidirectional relation, like this:
[NDOPersistent]public class Person{[NDORelation(typeof(Person))]List parents = new List();[NDORelation(typeof(Person))]List childs = new List();...}
Now NDO creates a mapping table and maps both relations to the same foreign key column IDPerson. That's only half of what we want. Start the mapping tool, open the node for the Person class and click at the child relation node. Enter IDParent as ForeignKeyColumnName. Then click at the MappingTable node beneath the child relation. Enter IDChild as ChildForeignKeyColumnName.
Now do the same procedure with the parent relation node, but enter IDChild as ForeignKeyColumnName and IDParent as ChildForeignKeyColumnName in the MappingTable node. Then the code works.
That's the good news. The bad new is, that due to a bug in the NDO.dll you'll get the wrong child objects if you do a query and navigate to the parents relation. Because of VS 2005 SP 1 we're in preparation of the NDO SP 2 to appear in a few days in which the bug will be fixed.
Best RegardsMirko