From: Michael D. <mik...@us...> - 2005-05-03 14:56:15
|
Update of /cvsroot/nhibernate/nhibernate/src/NHibernate.DomainModel In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv23265/NHibernate.DomainModel Modified Files: FooBar.hbm.xml Result.cs Log Message: updated with fix of NH-239. NH now correctly infers PersistentEnumTypes and can use it in a ctor for a query result. Index: Result.cs =================================================================== RCS file: /cvsroot/nhibernate/nhibernate/src/NHibernate.DomainModel/Result.cs,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** Result.cs 2 Jul 2004 19:39:29 -0000 1.2 --- Result.cs 3 May 2005 14:56:05 -0000 1.3 *************** *** 11,15 **** private long _amount; private int _count; ! public Result(string name, long amount, int count) { --- 11,17 ---- private long _amount; private int _count; ! ! private FooStatus _status; ! public Result(string name, long amount, int count) { *************** *** 18,21 **** --- 20,30 ---- _count = count; } + + // added this ctor to test Enums in ctor for query results + public Result(string name, long amount, int count, FooStatus status) + : this(name, amount, count) + { + _status = status; + } public string Name *************** *** 37,40 **** --- 46,57 ---- } + public FooStatus Status + { + get { return _status; } + set { _status = value; } + } + + + } } Index: FooBar.hbm.xml =================================================================== RCS file: /cvsroot/nhibernate/nhibernate/src/NHibernate.DomainModel/FooBar.hbm.xml,v retrieving revision 1.23 retrieving revision 1.24 diff -C2 -d -r1.23 -r1.24 *** FooBar.hbm.xml 24 Apr 2005 19:37:56 -0000 1.23 --- FooBar.hbm.xml 3 May 2005 14:56:05 -0000 1.24 *************** *** 66,70 **** <property name="YesNo" type="yes_no"/> ! <property name="Status" column="`status_@###`" type="NHibernate.DomainModel.FooStatus, NHibernate.DomainModel"/> <property name="Locale" column="`localeayzabc123!@#$`" access="field.camelcase-underscore" type="locale"/> --- 66,70 ---- <property name="YesNo" type="yes_no"/> ! <property name="Status" column="`status_@###`" /><!--type="NHibernate.DomainModel.FooStatus, NHibernate.DomainModel" --> <property name="Locale" column="`localeayzabc123!@#$`" access="field.camelcase-underscore" type="locale"/> |