Hi,
I patched this myself with attached patch. We use it in production for a few months without any issues. (I think I also attached the patch to JIRA a few months ago). Kind Regards, Jan On Fri, 2009-03-13 at 08:04 -0700, Oskar Berggren wrote: > Hi, > > It seems the <join> mapping clause does not accept collection members? > Is this true of am I missing something? Why is it so? > > Regards, > Oskar Berggren
Index: src/NHibernate/Cfg/XmlHbmBinding/ClassBinder.cs
===================================================================
--- src/NHibernate/Cfg/XmlHbmBinding/ClassBinder.cs (revision 3469)
+++ src/NHibernate/Cfg/XmlHbmBinding/ClassBinder.cs (working copy)
@@ -249,6 +249,17 @@
string propertyName = nameAttribute == null ? null : nameAttribute.Value;
IValue value = null;
+
+ CollectionBinder cbinder = new CollectionBinder(this);
+ if (cbinder.CanCreate (name))
+ {
+ Mapping.Collection collection = cbinder.Create(name, subnode, persistentClass.EntityName,
+ propertyName, persistentClass, persistentClass.MappedClass);
+
+ mappings.AddCollection(collection);
+ value = collection;
+ }
+ else
switch (name)
{
case "many-to-one":
Index: src/NHibernate/Cfg/MappingSchema/Hbm.generated.cs
===================================================================
--- src/NHibernate/Cfg/MappingSchema/Hbm.generated.cs (revision 3469)
+++ src/NHibernate/Cfg/MappingSchema/Hbm.generated.cs (working copy)
@@ -3780,6 +3780,9 @@
[System.Xml.Serialization.XmlElementAttribute("dynamic-component", typeof(HbmDynamicComponent))]
[System.Xml.Serialization.XmlElementAttribute("many-to-one", typeof(HbmManyToOne))]
[System.Xml.Serialization.XmlElementAttribute("property", typeof(HbmProperty))]
+ [System.Xml.Serialization.XmlElementAttribute("set", typeof(HbmSet))]
+ [System.Xml.Serialization.XmlElementAttribute("list", typeof(HbmList))]
+ [System.Xml.Serialization.XmlElementAttribute("bag", typeof(HbmBag))]
public object[] Items;
/// <remarks/>
Index: src/NHibernate/nhibernate-mapping.xsd
===================================================================
--- src/NHibernate/nhibernate-mapping.xsd (revision 3469)
+++ src/NHibernate/nhibernate-mapping.xsd (working copy)
@@ -614,6 +614,9 @@
<xs:element ref="many-to-one" />
<xs:element ref="component" />
<xs:element ref="dynamic-component" />
+ <xs:element ref="set" />
+ <xs:element ref="list" />
+ <xs:element ref="bag" />
<xs:element ref="any" />
</xs:choice>
<xs:element ref="sql-insert" minOccurs="0" />
signature.asc
Description: This is a digitally signed message part
