Page 1 of 1

Castle ActiveRecord template not correctly setting attributes for Table Per Type inheritance

Posted: Wed 05 Feb 2014 08:56
by PeterM
Hi,

When using Table Per Type inheritance I'm expecting to see [JoinedKey] and [JoinedBase] attributes in my generated class files. However they seem to be missing. Is there an additional option that needs to be set?
(For reference: http://docs.castleproject.org/Active%20 ... archy.ashx)
-
Peter

Re: Castle ActiveRecord template not correctly setting attributes for Table Per Type inheritance

Posted: Thu 06 Feb 2014 17:23
by Shalex
Please add custom attributes via interface of Entity Developer in the following way:
a) navigate to Model > Settings > Attributes > select the assembly with the needed attributes and make sure that the needed attributes are checked in the window below, press OK
b) select the needed attribute in the Attributes collection of a particular class or a class property
Does this help?

Re: Castle ActiveRecord template not correctly setting attributes for Table Per Type inheritance

Posted: Thu 06 Feb 2014 17:37
by PeterM
That would be the (already implemented) workaround indeed, however it is the default required behaviour for this type of inheritance when using activerecord. So I'd actually expect the template would add them :).
But at least I now know the effort I did for adding them was indeed the current 'accepted' way to do it.

Re: Castle ActiveRecord template not correctly setting attributes for Table Per Type inheritance

Posted: Fri 07 Feb 2014 11:36
by Shalex
PeterM wrote:however it is the default required behaviour for this type of inheritance when using activerecord. So I'd actually expect the template would add them
We will investigate the question and notify you about the result.

Re: Castle ActiveRecord template not correctly setting attributes for Table Per Type inheritance

Posted: Fri 07 Mar 2014 09:37
by Shalex
The bug with generating the JoinedBase and JoinedKey attributes by the Castle ActiveRecord template is fixed in the latest (5.7.311) build of Entity Developer: http://forums.devart.com/viewtopic.php?f=32&t=29092.

It can be downloaded from http://www.devart.com/entitydeveloper/download.html (trial version) or from Registered Users' Area (for users with active subscription only).