Bag of class inherited in another assembly doesn't work.

Description

Hello,
My problem is the following :
I have a bag of ZacAction class (which is a mother class for all action classes) :

[Bag(0, Inverse = true, Name = "Actions", Cascade = "save-update", Lazy = CollectionLazy.True, BatchSize = 2000)]
[Key(1, Column = "AlertId", OnDelete = OnDelete.Cascade)]
[OneToMany(2, Class = "CoreDomain.Alerts.Core.ZacAction")]
public virtual IList<ZacAction> Actions { get; set; }

The definition of one of the inheritors is :

[JoinedSubclass(Table = "ConsoleAction", Name = "CoreDomain.Alerts.Core.BuiltInActions.ZacConsoleAction",
Extends = "CoreDomain.Alerts.Core.ZacAction")]
public class ZacConsoleAction : ZacAction
{
[Key(0, Column = "Id", OnDelete = OnDelete.Cascade)]
[Property(1)]
public virtual string Message { get; set; } ...

Until there everything is OK, but if you derive ZacAction in another assembly then try to use the code, you obtain a =>
"instance not of expected entity type"

I tried without NHibernate.Mapping.Attributes, by writing my own xml config file, and the result is the same. I also tried to specify the assemblies everywhere with no better success.
Thx

Environment

None

Activity

Show:

Pierre Henri Kuaté September 10, 2010 at 1:11 AM

This issue is related to NHibernate itself.
Please, ask on the forum if it is a bug:
http://groups.google.com/group/nhusers/

External Issue

Details

Assignee

Reporter

Components

Affects versions

Priority

Who's Looking?

Open Who's Looking?

Created July 1, 2010 at 5:59 AM
Updated September 10, 2010 at 1:11 AM
Resolved September 10, 2010 at 1:11 AM
Who's Looking?