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

Discussion of open issues, suggestions and bugs regarding Entity Developer - ORM modeling and code generation tool
Post Reply
PeterM
Posts: 14
Joined: Tue 16 Jul 2013 12:53

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

Post by PeterM » Wed 05 Feb 2014 08:56

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

Shalex
Site Admin
Posts: 8245
Joined: Thu 14 Aug 2008 12:44

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

Post by Shalex » Thu 06 Feb 2014 17:23

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?

PeterM
Posts: 14
Joined: Tue 16 Jul 2013 12:53

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

Post by PeterM » Thu 06 Feb 2014 17:37

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.

Shalex
Site Admin
Posts: 8245
Joined: Thu 14 Aug 2008 12:44

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

Post by Shalex » Fri 07 Feb 2014 11:36

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.

Shalex
Site Admin
Posts: 8245
Joined: Thu 14 Aug 2008 12:44

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

Post by Shalex » Fri 07 Mar 2014 09:37

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).

Post Reply