If EntityA has a persistent property of type StructureA, then when an instance of EntityA is created, I would expect that the constructor for StructureA to be called... but it is not.

Updated at 17.05.2010 3:06:39

Fixed it... I thought that if you create EntityA, then DO will automatically create an instance of StructureA...

But apparently one must do: MyProperty = new StructureA() in the constructor of EntityA

This thread was imported from our support forum. The original discussion may contain more detailed answer.

asked May 17 '10 at 02:59

ara's gravatar image


That's right. DataObjects.Net doesn't instantiate instances of persistent types by calling their public constructors. It calls protected constructors injected via PostSharp on post-compilation step instead.

(May 17 '10 at 02:59) Dmitri Maximov Dmitri%20Maximov's gravatar image
Be the first one to answer this question!
Please start posting your answer anonymously - your answer will be saved within the current session and published after you log in or create a new account. Please try to give a substantial answer, for discussions, please use comments and please do remember to vote (after you log in)!
toggle preview

powered by OSQA