|
From: Michael D. <mik...@us...> - 2004-04-09 12:51:16
|
Update of /cvsroot/nhibernate/nhibernate/src/NHibernate/Cfg In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv10585/Cfg Modified Files: Binder.cs Log Message: Added support for Bag collections. Index: Binder.cs =================================================================== RCS file: /cvsroot/nhibernate/nhibernate/src/NHibernate/Cfg/Binder.cs,v retrieving revision 1.11 retrieving revision 1.12 diff -C2 -d -r1.11 -r1.12 *** Binder.cs 9 Apr 2004 09:09:33 -0000 1.11 --- Binder.cs 9 Apr 2004 12:37:55 -0000 1.12 *************** *** 943,946 **** --- 943,959 ---- } + private static CollectionType BAG = new CollectionTypeBag("bag"); + private class CollectionTypeBag : CollectionType + { + public CollectionTypeBag(string xmlTag) : base(xmlTag) {} + public override Mapping.Collection Create(XmlNode node, string prefix, PersistentClass owner, Mappings mappings) + { + Bag bag = new Bag(owner); + Binder.BindCollection(node, bag, prefix, mappings); + return bag; + } + + } + private static CollectionType MAP = new CollectionTypeMap("map"); private class CollectionTypeMap : CollectionType { *************** *** 996,999 **** --- 1009,1013 ---- static CollectionType() { Instances.Add(MAP.ToString(), MAP); + Instances.Add(BAG.ToString(), BAG); Instances.Add(SET.ToString(), SET); Instances.Add(LIST.ToString(), LIST); |