Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/jsf-2/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Fluent nhibernate 集合映射中的重复列 我有一个表XX的映射文件,其中包含复合键XX_ID和a_ID XX类 { 复合ID() .KeyProperty(x=>x.Id,“XX_Id”) .KeyReference(x=>x.A,“A_ID”); } 具有另一个表YY,该表具_Fluent Nhibernate - Fatal编程技术网

Fluent nhibernate 集合映射中的重复列 我有一个表XX的映射文件,其中包含复合键XX_ID和a_ID XX类 { 复合ID() .KeyProperty(x=>x.Id,“XX_Id”) .KeyReference(x=>x.A,“A_ID”); } 具有另一个表YY,该表具

Fluent nhibernate 集合映射中的重复列 我有一个表XX的映射文件,其中包含复合键XX_ID和a_ID XX类 { 复合ID() .KeyProperty(x=>x.Id,“XX_Id”) .KeyReference(x=>x.A,“A_ID”); } 具有另一个表YY,该表具,fluent-nhibernate,Fluent Nhibernate,集合映射中的重复列 我有一个表XX的映射文件,其中包含复合键XX_ID和a_ID XX类 { 复合ID() .KeyProperty(x=>x.Id,“XX_Id”) .KeyReference(x=>x.A,“A_ID”); } 具有另一个表YY,该表具有复合键YY_ID和A_ID。 YY类 { 复合ID() .KeyProperty(x=>x.Id,“YY_Id”) .KeyReference(x=>x.A,“A_ID”); } 现在我在XX和YY之间创建多对多关系,使用表XX中的公共表XX

集合映射中的重复列 我有一个表XX的映射文件,其中包含复合键XX_ID和a_ID XX类 { 复合ID() .KeyProperty(x=>x.Id,“XX_Id”) .KeyReference(x=>x.A,“A_ID”); } 具有另一个表YY,该表具有复合键YY_ID和A_ID。 YY类 { 复合ID() .KeyProperty(x=>x.Id,“YY_Id”) .KeyReference(x=>x.A,“A_ID”); } 现在我在XX和YY之间创建多对多关系,使用表XX中的公共表XX_YY,所以类XX是这样写的。 XX类 { 复合ID() .KeyProperty(x=>x.Id,“XX_Id”) .KeyReference(x=>x.A,“A_ID”); HasManyToMany(x=>x.XXList) .表格(“XX_YY”) .ParentKeyColumns.Add(“XX\u ID”、“A\u ID”) .ChildKeyColumns.Add(“YY_ID”,“A_ID”) .Cascade.All() .LazyLoad(); } 这给了我错误:- 集合:XX列:A_ID的映射中重复列
请尝试在YY和XX中无需A_ID键引用的映射。 I have a Mapping file of Table XX with composite key XX_ID and A_ID class XX { CompositeId() .KeyProperty(x => x.Id, "XX_ID") .KeyReference(x => x.A, "A_ID"); } Having Another Table YY with Composite key YY_ID and A_ID. class YY { CompositeId() .KeyProperty(x => x.Id, "YY_ID") .KeyReference(x => x.A, "A_ID"); } Now I am Creating many-To-many relationship in between XX and YY with common table XX_YY in Table XX so Class XX is written Like this. class XX { CompositeId() .KeyProperty(x => x.Id, "XX_ID") .KeyReference(x => x.A, "A_ID"); HasManyToMany(x => x.XXList) .Table("XX_YY") .ParentKeyColumns.Add("XX_ID", "A_ID") .ChildKeyColumns.Add("YY_ID", "A_ID") .Cascade.All() .LazyLoad(); } its giving me Error:- Repeated column in mapping for collection: XX column: A_ID