nhibernate - Invalid index n for this SqlParameterCollection with Count=m -


i'm getting nasty error in castle active record (wrapped around nhibernate) when try save class:

invalid index n sqlparametercollection count=m

i know error caused property being mapped multiple times in class i'm not sure how around it. have 2 child classes both map class in question using same column (ipaddressnumber). ipaddressnumber primary key of class, results in nhibernate trying map ipaddressnumber property 3 times (just guess.)

here class:

[activerecord(lazy=true)]     public class deviceconfiguration : usersdatabase<deviceconfiguration>     {         [primarykey]         public virtual long ipaddressnumber { get; set; }          [belongsto("ipaddressnumber", lazy = fetchwhen.oninvoke)]         public virtual vehicle vehicle { get; set; }          [belongsto("ipaddressnumber", lazy = fetchwhen.oninvoke)]         public virtual jbusconfiguration jbusconfiguration { get; set; } } 

any appreciated...

i ended having remove second association altogether around issue. not great solution 1 find.


Comments

Popular posts from this blog

Javascript line number mapping -

c# - Is it possible to remove an existing registration from Autofac container builder? -

php - Mysql PK and FK char(36) vs int(10) -