You can subscribe to this list here.
2004 |
Jan
|
Feb
|
Mar
|
Apr
(248) |
May
(82) |
Jun
(90) |
Jul
(177) |
Aug
(253) |
Sep
(157) |
Oct
(151) |
Nov
(143) |
Dec
(278) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2005 |
Jan
(152) |
Feb
(107) |
Mar
(177) |
Apr
(133) |
May
(259) |
Jun
(81) |
Jul
(119) |
Aug
(306) |
Sep
(416) |
Oct
(240) |
Nov
(329) |
Dec
(206) |
2006 |
Jan
(466) |
Feb
(382) |
Mar
(153) |
Apr
(162) |
May
(133) |
Jun
(21) |
Jul
(18) |
Aug
(37) |
Sep
(97) |
Oct
(114) |
Nov
(110) |
Dec
(28) |
2007 |
Jan
(74) |
Feb
(65) |
Mar
(49) |
Apr
(76) |
May
(43) |
Jun
(15) |
Jul
(68) |
Aug
(55) |
Sep
(63) |
Oct
(59) |
Nov
(70) |
Dec
(66) |
2008 |
Jan
(71) |
Feb
(60) |
Mar
(120) |
Apr
(31) |
May
(48) |
Jun
(81) |
Jul
(107) |
Aug
(51) |
Sep
(80) |
Oct
(83) |
Nov
(83) |
Dec
(79) |
2009 |
Jan
(83) |
Feb
(110) |
Mar
(97) |
Apr
(91) |
May
(291) |
Jun
(250) |
Jul
(197) |
Aug
(58) |
Sep
(54) |
Oct
(122) |
Nov
(68) |
Dec
(34) |
2010 |
Jan
(50) |
Feb
(17) |
Mar
(63) |
Apr
(61) |
May
(84) |
Jun
(81) |
Jul
(138) |
Aug
(144) |
Sep
(78) |
Oct
(26) |
Nov
(30) |
Dec
(61) |
2011 |
Jan
(33) |
Feb
(35) |
Mar
(166) |
Apr
(221) |
May
(109) |
Jun
(76) |
Jul
(27) |
Aug
(37) |
Sep
(1) |
Oct
(4) |
Nov
(2) |
Dec
(1) |
2012 |
Jan
|
Feb
|
Mar
(2) |
Apr
(2) |
May
|
Jun
|
Jul
(1) |
Aug
|
Sep
(1) |
Oct
|
Nov
(1) |
Dec
|
2013 |
Jan
|
Feb
(1) |
Mar
|
Apr
|
May
|
Jun
|
Jul
(1) |
Aug
(1) |
Sep
(3) |
Oct
(2) |
Nov
|
Dec
(1) |
2014 |
Jan
(1) |
Feb
(1) |
Mar
(3) |
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
From: Michael D. <mik...@us...> - 2005-01-23 15:52:15
|
Update of /cvsroot/nhibernate/nhibernate/src/NHibernate/Impl In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv18619/Impl Modified Files: CollectionEntry.cs Log Message: removed initialization of fields since they are initialized to framework default values. Index: CollectionEntry.cs =================================================================== RCS file: /cvsroot/nhibernate/nhibernate/src/NHibernate/Impl/CollectionEntry.cs,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** CollectionEntry.cs 31 Dec 2004 19:50:54 -0000 1.3 --- CollectionEntry.cs 23 Jan 2005 15:52:07 -0000 1.4 *************** *** 17,20 **** --- 17,21 ---- /// <summary></summary> + // false by default internal bool dirty; *************** *** 115,119 **** public CollectionEntry() { ! this.dirty = false; this.initialized = true; } --- 116,121 ---- public CollectionEntry() { ! // dirty is initialized to false by runtime ! //this.dirty = false; this.initialized = true; } *************** *** 127,131 **** public CollectionEntry( CollectionPersister loadedPersister, object loadedID, bool initialized ) { ! this.dirty = false; this.initialized = initialized; this.loadedKey = loadedID; --- 129,134 ---- public CollectionEntry( CollectionPersister loadedPersister, object loadedID, bool initialized ) { ! // dirty is initialized to false by runtime ! //this.dirty = false; this.initialized = initialized; this.loadedKey = loadedID; |
From: Michael D. <mik...@us...> - 2005-01-23 15:50:30
|
Update of /cvsroot/nhibernate/nhibernate/src/NHibernate/Impl In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv18064/Impl Modified Files: MessageHelper.cs SessionFactoryObjectFactory.cs Log Message: Sealed the class and made default ctor private. Index: MessageHelper.cs =================================================================== RCS file: /cvsroot/nhibernate/nhibernate/src/NHibernate/Impl/MessageHelper.cs,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** MessageHelper.cs 31 Dec 2004 19:52:03 -0000 1.4 --- MessageHelper.cs 23 Jan 2005 15:50:21 -0000 1.5 *************** *** 11,14 **** --- 11,20 ---- internal sealed class MessageHelper { + + private MessageHelper() + { + // should not be created + } + /// <summary> /// Index: SessionFactoryObjectFactory.cs =================================================================== RCS file: /cvsroot/nhibernate/nhibernate/src/NHibernate/Impl/SessionFactoryObjectFactory.cs,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** SessionFactoryObjectFactory.cs 31 Dec 2004 19:54:30 -0000 1.3 --- SessionFactoryObjectFactory.cs 23 Jan 2005 15:50:21 -0000 1.4 *************** *** 21,25 **** /// </para> /// </remarks> ! public class SessionFactoryObjectFactory { // to stop this class from being unloaded - this is a comment --- 21,25 ---- /// </para> /// </remarks> ! public sealed class SessionFactoryObjectFactory { // to stop this class from being unloaded - this is a comment *************** *** 27,30 **** --- 27,34 ---- private static readonly SessionFactoryObjectFactory Instance; // not used !?! private static readonly ILog log; + + // in h2.0.3 these use a class called "FastHashMap" + private static readonly Hashtable Instances = new Hashtable(); + private static readonly Hashtable NamedInstances = new Hashtable(); /// <summary></summary> *************** *** 36,43 **** } ! // in h2.0.3 these use a class called "FastHashMap" ! private static readonly Hashtable Instances = new Hashtable(); ! private static readonly Hashtable NamedInstances = new Hashtable(); ! /// <summary> --- 40,47 ---- } ! private SessionFactoryObjectFactory() ! { ! // should not be created ! } /// <summary> |
From: Michael D. <mik...@us...> - 2005-01-23 15:48:09
|
Update of /cvsroot/nhibernate/nhibernate/src/NHibernate/SqlCommand In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv17470/SqlCommand Modified Files: ANSIJoinFragment.cs QuerySelect.cs SqlDeleteBuilder.cs SqlUpdateBuilder.cs Template.cs Log Message: parameter renaming from FxCop fixed a spelling error in the error message that is generated in AnsiJoinFragment. Index: ANSIJoinFragment.cs =================================================================== RCS file: /cvsroot/nhibernate/nhibernate/src/NHibernate/SqlCommand/ANSIJoinFragment.cs,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** ANSIJoinFragment.cs 31 Dec 2004 22:24:36 -0000 1.3 --- ANSIJoinFragment.cs 23 Jan 2005 15:48:00 -0000 1.4 *************** *** 40,44 **** break; default: ! throw new AssertionFailure( "undefind join type" ); } --- 40,44 ---- break; default: ! throw new AssertionFailure( "undefined join type" ); } Index: SqlDeleteBuilder.cs =================================================================== RCS file: /cvsroot/nhibernate/nhibernate/src/NHibernate/SqlCommand/SqlDeleteBuilder.cs,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** SqlDeleteBuilder.cs 31 Dec 2004 22:25:33 -0000 1.5 --- SqlDeleteBuilder.cs 23 Jan 2005 15:48:00 -0000 1.6 *************** *** 87,95 **** /// Adds a string to the WhereFragement /// </summary> ! /// <param name="whereString">A well formed sql string with no parameters.</param> /// <returns>The SqlDeleteBuilder</returns> ! public SqlDeleteBuilder AddWhereFragment( string whereString ) { ! whereStrings.Add( new SqlString( whereString ) ); return this; } --- 87,95 ---- /// Adds a string to the WhereFragement /// </summary> ! /// <param name="whereSql">A well formed sql statement with no parameters.</param> /// <returns>The SqlDeleteBuilder</returns> ! public SqlDeleteBuilder AddWhereFragment( string whereSql ) { ! whereStrings.Add( new SqlString( whereSql ) ); return this; } Index: QuerySelect.cs =================================================================== RCS file: /cvsroot/nhibernate/nhibernate/src/NHibernate/SqlCommand/QuerySelect.cs,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** QuerySelect.cs 31 Dec 2004 22:25:19 -0000 1.4 --- QuerySelect.cs 23 Jan 2005 15:48:00 -0000 1.5 *************** *** 22,26 **** private StringBuilder orderBy = new StringBuilder(); private StringBuilder having = new StringBuilder(); ! private bool distinct = false; /// <summary> --- 22,28 ---- private StringBuilder orderBy = new StringBuilder(); private StringBuilder having = new StringBuilder(); ! ! // false by default ! private bool distinct; /// <summary> *************** *** 200,207 **** /// <summary> ! /// /// </summary> ! /// <param name="orderByString"></param> ! public void AddOrderBy( string orderByString ) { if( orderBy.Length > 0 ) --- 202,210 ---- /// <summary> ! /// Adds a string containing a valid "order by" sql statement ! /// to this QuerySelect /// </summary> ! /// <param name="orderBySql">The "order by" sql statement.</param> ! public void AddOrderBy( string orderBySql ) { if( orderBy.Length > 0 ) *************** *** 209,213 **** orderBy.Append( StringHelper.CommaSpace ); } ! orderBy.Append( orderByString ); } --- 212,216 ---- orderBy.Append( StringHelper.CommaSpace ); } ! orderBy.Append( orderBySql ); } Index: SqlUpdateBuilder.cs =================================================================== RCS file: /cvsroot/nhibernate/nhibernate/src/NHibernate/SqlCommand/SqlUpdateBuilder.cs,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** SqlUpdateBuilder.cs 31 Dec 2004 22:25:58 -0000 1.5 --- SqlUpdateBuilder.cs 23 Jan 2005 15:48:00 -0000 1.6 *************** *** 155,163 **** /// Adds a string to the WhereFragement /// </summary> ! /// <param name="whereString">A well formed sql string with no parameters.</param> /// <returns>The SqlUpdateBuilder</returns> ! public SqlUpdateBuilder AddWhereFragment( string whereString ) { ! whereStrings.Add( new SqlString( whereString ) ); return this; } --- 155,163 ---- /// Adds a string to the WhereFragement /// </summary> ! /// <param name="whereSql">A well formed sql string with no parameters.</param> /// <returns>The SqlUpdateBuilder</returns> ! public SqlUpdateBuilder AddWhereFragment( string whereSql ) { ! whereStrings.Add( new SqlString( whereSql ) ); return this; } Index: Template.cs =================================================================== RCS file: /cvsroot/nhibernate/nhibernate/src/NHibernate/SqlCommand/Template.cs,v retrieving revision 1.11 retrieving revision 1.12 diff -C2 -d -r1.11 -r1.12 *** Template.cs 31 Dec 2004 22:25:58 -0000 1.11 --- Template.cs 23 Jan 2005 15:48:00 -0000 1.12 *************** *** 88,101 **** /// Takes the where condition provided in the mapping attribute and iterpolates the alias. /// </summary> ! /// <param name="sqlWhereString"></param> ! /// <param name="dialect"></param> ! /// <returns></returns> ! public static string RenderWhereStringTemplate( string sqlWhereString, Dialect.Dialect dialect ) { //TODO: make this a bit nicer. ! StringTokenizer tokens = new StringTokenizer( sqlWhereString, delimiters, true ); ! StringBuilder result = new StringBuilder( sqlWhereString.Length + 10 ); bool quoted = false; --- 88,103 ---- /// Takes the where condition provided in the mapping attribute and iterpolates the alias. /// </summary> ! /// <param name="whereSql">The "where" sql statement from the mapping attribute.</param> ! /// <param name="dialect">The <see cref="Dialect.Dialect"/> to help with rendering the Sql.</param> ! /// <returns> ! /// A well formed "where" sql statement for the <see cref="Dialect.Dialect"/>. ! /// </returns> ! public static string RenderWhereStringTemplate( string whereSql, Dialect.Dialect dialect ) { //TODO: make this a bit nicer. ! StringTokenizer tokens = new StringTokenizer( whereSql, delimiters, true ); ! StringBuilder result = new StringBuilder( whereSql.Length + 10 ); bool quoted = false; *************** *** 165,178 **** /// <summary> ! /// Takes order-by clause in the mapping attribute and iterpolates the alias /// </summary> ! /// <param name="sqlOrderByString"></param> ! /// <param name="dialect"></param> ! /// <returns></returns> ! public static string RenderOrderByStringTemplate( string sqlOrderByString, Dialect.Dialect dialect ) { //TODO: make this a bit nicer ! StringTokenizer tokens = new StringTokenizer( sqlOrderByString, ",", false ); ! StringBuilder result = new StringBuilder( sqlOrderByString.Length + 2 ); bool commaNeeded = false; IEnumerator tokenEnum = tokens.GetEnumerator(); --- 167,182 ---- /// <summary> ! /// Takes "order by" clause in the mapping attribute and iterpolates the alias /// </summary> ! /// <param name="orderBySql">The "order by" sql statement from the mapping.</param> ! /// <param name="dialect">The <see cref="Dialect.Dialect"/> to help with rendering the Sql.</param> ! /// <returns> ! /// A well formed "order by" sql statement for the <see cref="Dialect.Dialect"/>. ! /// </returns> ! public static string RenderOrderByStringTemplate( string orderBySql, Dialect.Dialect dialect ) { //TODO: make this a bit nicer ! StringTokenizer tokens = new StringTokenizer( orderBySql, ",", false ); ! StringBuilder result = new StringBuilder( orderBySql.Length + 2 ); bool commaNeeded = false; IEnumerator tokenEnum = tokens.GetEnumerator(); |
From: Michael D. <mik...@us...> - 2005-01-23 15:44:35
|
Update of /cvsroot/nhibernate/nhibernate/src/NHibernate/Expression In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv16549/Expression Modified Files: LogicalExpression.cs Log Message: changed protected fields to private since there was already a protected Property for them. Index: LogicalExpression.cs =================================================================== RCS file: /cvsroot/nhibernate/nhibernate/src/NHibernate/Expression/LogicalExpression.cs,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** LogicalExpression.cs 31 Dec 2004 17:56:25 -0000 1.6 --- LogicalExpression.cs 23 Jan 2005 15:44:27 -0000 1.7 *************** *** 10,17 **** public abstract class LogicalExpression : Expression { ! /// <summary></summary> ! protected Expression lhs; ! /// <summary></summary> ! protected Expression rhs; /// <summary> --- 10,15 ---- public abstract class LogicalExpression : Expression { ! private Expression lhs; ! private Expression rhs; /// <summary> |
From: Michael D. <mik...@us...> - 2005-01-23 15:42:49
|
Update of /cvsroot/nhibernate/nhibernate/src/NHibernate/SqlTypes In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv16206/SqlTypes Modified Files: SqlType.cs Log Message: removed initialization of fields since they are initialized to framework default values. Index: SqlType.cs =================================================================== RCS file: /cvsroot/nhibernate/nhibernate/src/NHibernate/SqlTypes/SqlType.cs,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** SqlType.cs 31 Dec 2004 22:32:52 -0000 1.6 --- SqlType.cs 23 Jan 2005 15:42:41 -0000 1.7 *************** *** 27,32 **** private byte _scale; ! private bool _lengthDefined = false; ! private bool _precisionDefined = false; /// <summary> --- 27,34 ---- private byte _scale; ! // false by default ! private bool _lengthDefined; ! // false by default ! private bool _precisionDefined; /// <summary> |
From: Michael D. <mik...@us...> - 2005-01-23 15:41:49
|
Update of /cvsroot/nhibernate/nhibernate/src/NHibernate/Cfg In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv16006/Cfg Modified Files: Environment.cs Log Message: Sealed the class and made default ctor private. Index: Environment.cs =================================================================== RCS file: /cvsroot/nhibernate/nhibernate/src/NHibernate/Cfg/Environment.cs,v retrieving revision 1.22 retrieving revision 1.23 diff -C2 -d -r1.22 -r1.23 *** Environment.cs 31 Dec 2004 15:54:08 -0000 1.22 --- Environment.cs 23 Jan 2005 15:41:39 -0000 1.23 *************** *** 24,28 **** /// </list> /// </remarks> ! public class Environment { private static readonly ILog log = LogManager.GetLogger( typeof( Environment ) ); --- 24,28 ---- /// </list> /// </remarks> ! public sealed class Environment { private static readonly ILog log = LogManager.GetLogger( typeof( Environment ) ); *************** *** 83,86 **** --- 83,91 ---- } + private Environment() + { + // should not be created. + } + /// <summary> /// Gets a copy of the configuration found in app.config/web.config |
From: Michael D. <mik...@us...> - 2005-01-23 15:41:11
|
Update of /cvsroot/nhibernate/nhibernate/src/NHibernate/Transaction In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv15817/Transaction Modified Files: TransactionFactory.cs Added Files: AdoTransaction.cs Removed Files: Transaction.cs Log Message: Moved EmptyInterceptor out of Configuration and into its own class. Renamed Transaction to AdoTransaction. --- NEW FILE: AdoTransaction.cs --- using System; using System.Data; using log4net; using NHibernate.Engine; namespace NHibernate.Transaction { /// <summary> /// Wraps an ADO.NET transaction to implements the <c>ITransaction</c> interface /// </summary> public class AdoTransaction : ITransaction { private static readonly ILog log = LogManager.GetLogger( typeof( AdoTransaction ) ); private ISessionImplementor session; private IDbTransaction trans; private bool begun; private bool committed; private bool rolledBack; /// <summary> /// /// </summary> /// <param name="session"></param> public AdoTransaction( ISessionImplementor session ) { this.session = session; } /// <summary> /// /// </summary> /// <param name="command"></param> public void Enlist( IDbCommand command ) { if( trans == null ) { if( log.IsWarnEnabled ) { if( command.Transaction != null ) { log.Warn( "set a nonnull IDbCommand.Transaction to null because the Session had no Transaction" ); } } command.Transaction = null; return; } else { if( log.IsWarnEnabled ) { // got into here because the command was being initialized and had a null Transaction - probably // don't need to be confused by that - just a normal part of initialization... if( command.Transaction != null && command.Transaction != trans ) { log.Warn( "The IDbCommand had a different Transaction than the Session. This can occur when " + "Disconnecting and Reconnecting Sessions because the PreparedCommand Cache is Session specific." ); } } command.Transaction = trans; } } /// <summary></summary> public void Begin() { log.Debug( "begin" ); try { IsolationLevel isolation = session.Factory.Isolation; if( isolation == IsolationLevel.Unspecified ) { trans = session.Connection.BeginTransaction(); } else { trans = session.Connection.BeginTransaction( isolation ); } } catch( Exception e ) { log.Error( "Begin transaction failed", e ); throw new TransactionException( "Begin failed with SQL exception", e ); } begun = true; } /// <summary></summary> public void Commit() { if( !begun ) { throw new TransactionException( "Transaction not successfully started" ); } log.Debug( "commit" ); try { if( session.FlushMode != FlushMode.Never ) { session.Flush(); } try { trans.Commit(); committed = true; } catch( Exception e ) { log.Error( "Commit failed", e ); throw new TransactionException( "Commit failed with SQL exception", e ); } } finally { session.AfterTransactionCompletion(); } } /// <summary></summary> public void Rollback() { if( !begun ) { throw new TransactionException( "Transaction not successfully started" ); } log.Debug( "rollback" ); try { trans.Rollback(); rolledBack = true; } catch( Exception e ) { log.Error( "Rollback failed", e ); throw new TransactionException( "Rollback failed with SQL Exception", e ); } finally { session.AfterTransactionCompletion(); } } /// <summary></summary> public bool WasRolledBack { get { return rolledBack; } } /// <summary></summary> public bool WasCommitted { get { return committed; } } } } --- Transaction.cs DELETED --- Index: TransactionFactory.cs =================================================================== RCS file: /cvsroot/nhibernate/nhibernate/src/NHibernate/Transaction/TransactionFactory.cs,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** TransactionFactory.cs 31 Dec 2004 22:41:39 -0000 1.2 --- TransactionFactory.cs 23 Jan 2005 15:41:03 -0000 1.3 *************** *** 16,20 **** public ITransaction BeginTransaction( ISessionImplementor session ) { ! Transaction tx = new Transaction( session ); tx.Begin(); return tx; --- 16,20 ---- public ITransaction BeginTransaction( ISessionImplementor session ) { ! AdoTransaction tx = new AdoTransaction( session ); tx.Begin(); return tx; |
From: Michael D. <mik...@us...> - 2005-01-23 15:41:11
|
Update of /cvsroot/nhibernate/nhibernate/src/NHibernate/Cfg In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv15817/Cfg Modified Files: Configuration.cs Added Files: EmptyInterceptor.cs Log Message: Moved EmptyInterceptor out of Configuration and into its own class. Renamed Transaction to AdoTransaction. --- NEW FILE: EmptyInterceptor.cs --- using System; using System.Collections; using NHibernate.Type; namespace NHibernate.Cfg { [Serializable] internal class EmptyInterceptor : IInterceptor { public EmptyInterceptor() { } public void OnDelete( object entity, object id, object[ ] state, string[ ] propertyNames, IType[ ] types ) { } public bool OnFlushDirty( object entity, object id, object[ ] currentState, object[ ] previousState, string[ ] propertyNames, IType[ ] types ) { return false; } public bool OnLoad( object entity, object id, object[ ] state, string[ ] propertyNames, IType[ ] types ) { return false; } public bool OnSave( object entity, object id, object[ ] state, string[ ] propertyNames, IType[ ] types ) { return false; } public void OnPostFlush( object entity, object id, object[ ] currentState, string[ ] propertyNames, IType[ ] types ) { } public void PostFlush( ICollection entities ) { } public void PreFlush( ICollection entitites ) { } public object IsUnsaved( object entity ) { return null; } public object Instantiate( System.Type clazz, object id ) { return null; } public int[ ] FindDirty( object entity, object id, object[ ] currentState, object[ ] previousState, string[ ] propertyNames, IType[ ] types ) { return null; } } } Index: Configuration.cs =================================================================== RCS file: /cvsroot/nhibernate/nhibernate/src/NHibernate/Cfg/Configuration.cs,v retrieving revision 1.27 retrieving revision 1.28 diff -C2 -d -r1.27 -r1.28 *** Configuration.cs 3 Jan 2005 03:44:41 -0000 1.27 --- Configuration.cs 23 Jan 2005 15:41:02 -0000 1.28 *************** *** 32,35 **** --- 32,36 ---- { private static readonly ILog log = LogManager.GetLogger( typeof( Configuration ) ); + private static readonly IInterceptor emptyInterceptor = new EmptyInterceptor(); private Hashtable classes = new Hashtable(); *************** *** 39,43 **** private Hashtable namedQueries = new Hashtable(); private ArrayList secondPasses = new ArrayList(); ! private IInterceptor interceptor = EmptyInterceptor; private IDictionary properties = Environment.Properties; private IDictionary caches = new Hashtable(); --- 40,44 ---- private Hashtable namedQueries = new Hashtable(); private ArrayList secondPasses = new ArrayList(); ! private IInterceptor interceptor = emptyInterceptor; private IDictionary properties = Environment.Properties; private IDictionary caches = new Hashtable(); *************** *** 46,54 **** private XmlSchema cfgSchema; ! /// <summary></summary> public static readonly string MappingSchemaXMLNS = "urn:nhibernate-mapping-2.0"; private static readonly string MappingSchemaResource = "NHibernate.nhibernate-mapping-2.0.xsd"; ! /// <summary></summary> public static readonly string CfgSchemaXMLNS = "urn:nhibernate-configuration-2.0"; private static readonly string CfgSchemaResource = "NHibernate.nhibernate-configuration-2.0.xsd"; --- 47,59 ---- private XmlSchema cfgSchema; ! /// <summary> ! /// The XML Namespace for the nhibernate-mapping ! /// </summary> public static readonly string MappingSchemaXMLNS = "urn:nhibernate-mapping-2.0"; private static readonly string MappingSchemaResource = "NHibernate.nhibernate-mapping-2.0.xsd"; ! /// <summary> ! /// The XML Namespace for the nhibernate-configuration ! /// </summary> public static readonly string CfgSchemaXMLNS = "urn:nhibernate-configuration-2.0"; private static readonly string CfgSchemaResource = "NHibernate.nhibernate-configuration-2.0.xsd"; *************** *** 64,68 **** namedQueries = new Hashtable(); secondPasses = new ArrayList(); ! interceptor = EmptyInterceptor; properties = Environment.Properties; } --- 69,73 ---- namedQueries = new Hashtable(); secondPasses = new ArrayList(); ! interceptor = emptyInterceptor; properties = Environment.Properties; } *************** *** 571,626 **** } - private static readonly IInterceptor EmptyInterceptor = new EmptyInterceptorClass(); - - [Serializable] - private class EmptyInterceptorClass : IInterceptor - { - public void OnDelete( object entity, object id, object[ ] state, string[ ] propertyNames, IType[ ] types ) - { - } - - public bool OnFlushDirty( object entity, object id, object[ ] currentState, object[ ] previousState, string[ ] propertyNames, IType[ ] types ) - { - return false; - } - - public bool OnLoad( object entity, object id, object[ ] state, string[ ] propertyNames, IType[ ] types ) - { - return false; - } - - public bool OnSave( object entity, object id, object[ ] state, string[ ] propertyNames, IType[ ] types ) - { - return false; - } - - public void OnPostFlush( object entity, object id, object[ ] currentState, string[ ] propertyNames, IType[ ] types ) - { - } - - public void PostFlush( ICollection entities ) - { - } - - public void PreFlush( ICollection entitites ) - { - } - - public object IsUnsaved( object entity ) - { - return null; - } - - public object Instantiate( System.Type clazz, object id ) - { - return null; - } - - public int[ ] FindDirty( object entity, object id, object[ ] currentState, object[ ] previousState, string[ ] propertyNames, IType[ ] types ) - { - return null; - } - } - /// <summary> /// Instantitate a new <c>ISessionFactory</c>, using the properties and mappings in this --- 576,579 ---- |
From: Michael D. <mik...@us...> - 2005-01-23 15:41:11
|
Update of /cvsroot/nhibernate/nhibernate/src/NHibernate In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv15817 Modified Files: NHibernate-1.1.csproj Log Message: Moved EmptyInterceptor out of Configuration and into its own class. Renamed Transaction to AdoTransaction. Index: NHibernate-1.1.csproj =================================================================== RCS file: /cvsroot/nhibernate/nhibernate/src/NHibernate/NHibernate-1.1.csproj,v retrieving revision 1.68 retrieving revision 1.69 diff -C2 -d -r1.68 -r1.69 *** NHibernate-1.1.csproj 17 Jan 2005 03:40:49 -0000 1.68 --- NHibernate-1.1.csproj 23 Jan 2005 15:41:02 -0000 1.69 *************** *** 375,378 **** --- 375,383 ---- /> <File + RelPath = "Cfg\EmptyInterceptor.cs" + SubType = "Code" + BuildAction = "Compile" + /> + <File RelPath = "Cfg\Environment.cs" SubType = "Code" *************** *** 1690,1699 **** /> <File ! RelPath = "Transaction\ITransactionFactory.cs" SubType = "Code" BuildAction = "Compile" /> <File ! RelPath = "Transaction\Transaction.cs" SubType = "Code" BuildAction = "Compile" --- 1695,1704 ---- /> <File ! RelPath = "Transaction\AdoTransaction.cs" SubType = "Code" BuildAction = "Compile" /> <File ! RelPath = "Transaction\ITransactionFactory.cs" SubType = "Code" BuildAction = "Compile" |
From: Michael D. <mik...@us...> - 2005-01-23 15:37:59
|
Update of /cvsroot/nhibernate/nhibernate/src/NHibernate/Util In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv15133/NHibernate/Util Modified Files: PropertiesHelper.cs ReflectHelper.cs StringHelper.cs Log Message: Made mods from FxCop: Ensured default ctor was private. Sealed classes. Changed some const to static readonly. Parameter name cleanup. Index: ReflectHelper.cs =================================================================== RCS file: /cvsroot/nhibernate/nhibernate/src/NHibernate/Util/ReflectHelper.cs,v retrieving revision 1.21 retrieving revision 1.22 diff -C2 -d -r1.21 -r1.22 *** ReflectHelper.cs 3 Jan 2005 03:45:28 -0000 1.21 --- ReflectHelper.cs 23 Jan 2005 15:37:41 -0000 1.22 *************** *** 47,54 **** return true; } - catch( Exception ) - { - return false; - } } --- 47,50 ---- Index: StringHelper.cs =================================================================== RCS file: /cvsroot/nhibernate/nhibernate/src/NHibernate/Util/StringHelper.cs,v retrieving revision 1.17 retrieving revision 1.18 diff -C2 -d -r1.17 -r1.18 *** StringHelper.cs 1 Jan 2005 02:40:28 -0000 1.17 --- StringHelper.cs 23 Jan 2005 15:37:41 -0000 1.18 *************** *** 255,265 **** /// <summary> ! /// /// </summary> ! /// <param name="tfString"></param> ! /// <returns></returns> ! public static bool BooleanValue( string tfString ) { ! string trimmed = tfString.Trim().ToLower(); return trimmed.Equals( "true" ) || trimmed.Equals( "t" ); } --- 255,268 ---- /// <summary> ! /// Converts a <see cref="String"/> in the format of "true", "t", "false", or "f" to ! /// a <see cref="Boolean"/>. /// </summary> ! /// <param name="value">The string to convert.</param> ! /// <returns> ! /// The <c>value</c> converted to a <see cref="Boolean"/> . ! /// </returns> ! public static bool BooleanValue( string value ) { ! string trimmed = value.Trim().ToLower(); return trimmed.Equals( "true" ) || trimmed.Equals( "t" ); } Index: PropertiesHelper.cs =================================================================== RCS file: /cvsroot/nhibernate/nhibernate/src/NHibernate/Util/PropertiesHelper.cs,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** PropertiesHelper.cs 1 Jan 2005 02:40:02 -0000 1.8 --- PropertiesHelper.cs 23 Jan 2005 15:37:40 -0000 1.9 *************** *** 7,12 **** //Much of this code is taken from Maverick.NET /// <summary></summary> ! public class PropertiesHelper { /// <summary> /// --- 7,17 ---- //Much of this code is taken from Maverick.NET /// <summary></summary> ! public sealed class PropertiesHelper { + private PropertiesHelper() + { + // should not be created + } + /// <summary> /// *************** *** 120,128 **** /// <summary></summary> ! public const string TagParam = "param"; /// <summary></summary> ! public const string AttrValue = "value"; /// <summary></summary> ! public const string AttrName = "name"; /// <summary> --- 125,133 ---- /// <summary></summary> ! public static readonly string TagParam = "param"; /// <summary></summary> ! public static readonly string AttrValue = "value"; /// <summary></summary> ! public static readonly string AttrName = "name"; /// <summary> |
From: Michael D. <mik...@us...> - 2005-01-23 04:50:21
|
Update of /cvsroot/nhibernate/nhibernate In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv31876 Modified Files: releasenotes.txt Log Message: forgot to commit these changes a while ago. Index: releasenotes.txt =================================================================== RCS file: /cvsroot/nhibernate/nhibernate/releasenotes.txt,v retrieving revision 1.24 retrieving revision 1.25 diff -C2 -d -r1.24 -r1.25 *** releasenotes.txt 3 Jan 2005 03:48:42 -0000 1.24 --- releasenotes.txt 23 Jan 2005 04:50:11 -0000 1.25 *************** *** 1,2 **** --- 1,12 ---- + Build 0.7.0.0 + ======================== + - Renamed class NHibernate.NHibernate to NHibernate.NHibernateUtil. This will break alot of code if you were using ISession.Find with parameters - migrate to IQuery instead. + - Fixed bug with DateTime type where any value less than 1/1/1753 was written to the database as null. If you were relying on this then the Nullables library in NHibernateContrib is the way to code null values for DateTime properties. + - Added IDisposable to EnumerableImpl. + - Added default value of hibernate.connection.driver_class to Dialects. + - Fixed messages in exceptions from GetGetter and GetSetter in BasicPropertyAccessor and NoSetterAccessor. + - Improved messages in Exceptions thrown by ISetter. + - Improved messages in Exceptions for Persisters with problems parsing discriminator values. + Build 0.6.0.0 ======================== |
From: Michael D. <mik...@us...> - 2005-01-23 04:35:06
|
Update of /cvsroot/nhibernate/nhibernate/doc/reference/en/modules In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv28686 Modified Files: basic_mapping.xml Log Message: some updates to the docs. Index: basic_mapping.xml =================================================================== RCS file: /cvsroot/nhibernate/nhibernate/doc/reference/en/modules/basic_mapping.xml,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** basic_mapping.xml 16 Jan 2005 15:10:03 -0000 1.8 --- basic_mapping.xml 23 Jan 2005 04:34:56 -0000 1.9 *************** *** 617,625 **** </sect2> - <!-- - TODO: resume here <sect2 id="mapping-declaration-compositeid"> ! --> ! <sect2 id="mapping-declaration-property"> <title>property</title> --- 617,836 ---- </sect2> <sect2 id="mapping-declaration-compositeid"> ! <title>composite-id</title> ! ! <programlisting><composite-id ! name="propertyName"<co id="composite-id1-co" linkends="composite-id1" /> ! class="ClassName"<co id="composite-id2-co" linkends="composite-id2" /> ! unsaved-value="any|none"<co id="composite-id3-co" linkends="composite-id3" /> ! access="field|property|nosetter|ClassName"> ! ! <key-property name="propertyName" type="typename" column="column_name"/> ! <key-many-to-one name="propertyName class="ClassName" column="column_name"/> ! ...... ! </composite-id></programlisting> ! ! <para> ! For a table with a composite key, you may map multiple properties of the class ! as identifier properties. The <literal><composite-id></literal> element ! accepts <literal><key-property></literal> property mappings and ! <literal><key-many-to-one></literal> mappings as child elements. ! </para> ! ! <programlisting><![CDATA[<composite-id> ! <key-property name="medicareNumber"/> ! <key-property name="dependent"/> ! </composite-id>]]></programlisting> ! ! <para> ! Your persistent class <emphasis>must</emphasis> override <literal>Equals()</literal> ! and <literal>GetHashCode()</literal> to implement composite identifier equality. It must ! also be <literal>Serializable</literal>. ! </para> ! ! <para> ! Unfortunately, this approach to composite identifiers means that a persistent object ! is its own identifier. There is no convenient "handle" other than the object itself. ! You must instantiate an instance of the persistent class itself and populate its ! identifier properties before you can <literal>Load()</literal> the persistent state ! associated with a composite key. We will describe a much more ! convenient approach where the composite identifier is implemented as a seperate class ! in TODO:LINKTOCOMPENENTS<!--<xref linkend="components-compositeid"/>-->. The attributes described below apply only ! to this alternative approach: ! </para> ! ! <calloutlist> ! <callout arearefs="composite-id1-co" id="composite-id1"> ! <para> ! <literal>name</literal> (optional): A property of component type that holds the ! composite identifier (see next section). ! </para> ! </callout> ! <callout arearefs="composite-id2-co" id="composite-id2"> ! <para> ! <literal>class</literal> (optional - defaults to the property type determined by ! reflection): The component class used as a composite identifier (see next section). ! </para> ! </callout> ! <callout arearefs="composite-id3-co" id="composite-id3"> ! <para> ! <literal>unsaved-value</literal> (optional - defaults to <literal>none</literal>): ! Indicates that transient instances should be considered newly instantiated, if set ! to <literal>any</literal>. ! </para> ! </callout> ! </calloutlist> ! ! </sect2> ! ! <sect2 id="mapping-declaration-discriminator"> ! <title>discriminator</title> ! ! <para> ! The <literal><discriminator></literal> element is required for polymorphic persistence ! using the table-per-class-hierarchy mapping strategy and declares a discriminator column of the ! table. The discriminator column contains marker values that tell the persistence layer what ! subclass to instantiate for a particular row. A restricted set of types may be used: ! <literal>String</literal>, <literal>Char</literal>, <literal>Int32</literal>, ! <literal>Byte</literal>, <literal>Int16</literal>, <literal>Boolean</literal>, ! <literal>YesNo</literal>, <literal>TrueFalse</literal>. ! </para> ! ! <programlistingco> ! <programlisting><discriminator ! column="discriminator_column"<co id="discriminator1-co" linkends="discriminator1" /> ! type="discriminator_type"<co id="discriminator2-co" linkends="discriminator2" /> ! force="true|false"<co id="discriminator3-co" linkends="discriminator3" /> ! /></programlisting> ! <calloutlist> ! <callout arearefs="discriminator1-co" id="discriminator1"> ! <para> ! <literal>column</literal> (optional - defaults to <literal>class</literal>) the ! name of the discriminator column. ! </para> ! </callout> ! <callout arearefs="discriminator2-co" id="discriminator2"> ! <para> ! <literal>type</literal> (optional - defaults to <literal>String</literal>) a ! name that indicates the Hibernate type ! </para> ! </callout> ! <callout arearefs="discriminator3-co" id="discriminator3"> ! <para> ! <literal>force</literal> (optional - defaults to <literal>false</literal>) ! "force" NHibernate to specify allowed discriminator values even when retrieving ! all instances of the root class. ! </para> ! </callout> ! </calloutlist> ! </programlistingco> ! ! <para> ! Actual values of the discriminator column are specified by the ! <literal>discriminator-value</literal> attribute of the <literal><class></literal> and ! <literal><subclass></literal> elements. ! </para> ! ! <para> ! The <literal>force</literal> attribute is (only) useful if the table contains rows with ! "extra" discriminator values that are not mapped to a persistent class. This will not ! usually be the case. ! </para> ! </sect2> ! ! <sect2 id="mapping-declaration-version"> ! <title>version (optional)</title> ! ! <para> ! The <literal><version></literal> element is optional and indicates that ! the table contains versioned data. This is particularly useful if you plan to ! use <emphasis>long transactions</emphasis> (see below). ! </para> ! ! <programlistingco> ! <programlisting><version ! column="version_column"<co id="version1-co" linkends="version1" /> ! name="propertyName"<co id="version2-co" linkends="version2" /> ! type="typename"<co id="version3-co" linkends="version3" /> ! access="field|property|nosetter|ClassName"<co id="version4-co" linkends="version4" /> ! /></programlisting> ! <calloutlist> ! <callout arearefs="version1-co" id="version1"> ! <para> ! <literal>column</literal> (optional - defaults to the property name): The name ! of the column holding the version number. ! </para> ! </callout> ! <callout arearefs="version2-co" id="version2"> ! <para> ! <literal>name</literal>: The name of a property of the persistent class. ! </para> ! </callout> ! <callout arearefs="version3-co" id="version3"> ! <para> ! <literal>type</literal> (optional - defaults to <literal>Int32</literal>): ! The type of the version number. ! </para> ! </callout> ! <callout arearefs="version4-co" id="version4"> ! <para> ! <literal>access</literal> (optional - defaults to <literal>property</literal>): The ! strategy NHibernate should use for accessing the property value. ! </para> ! </callout> ! </calloutlist> ! </programlistingco> ! ! <para> ! Version numbers may be of type <literal>Int64</literal>, <literal>Int32</literal>, ! <literal>Int16</literal>, <literal>Ticks</literal>, <literal>Timestamp</literal>, ! or <literal>TimeSpan</literal>. ! </para> ! ! </sect2> ! ! <sect2 id="mapping-declaration-timestamp"> ! <title>timestamp (optional)</title> ! ! <para> ! The optional <literal><timestamp></literal> element indicates that the table contains ! timestamped data. This is intended as an alternative to versioning. Timestamps are by nature ! a less safe implementation of optimistic locking. However, sometimes the application might ! use the timestamps in other ways. ! </para> ! ! <programlistingco> ! <programlisting><timestamp ! column="timestamp_column"<co id="timestamp1-co" linkends="timestamp1" /> ! name="propertyName"<co id="timestamp2-co" linkends="timestamp2" /> ! access="field|property|nosetter|ClassName"<co id="timestamp3-co" linkends="timestamp3" /> ! /></programlisting> ! <calloutlist> ! <callout arearefs="timestamp1-co" id="timestamp1"> ! <para> ! <literal>column</literal> (optional - defaults to the property name): The name ! of a column holding the timestamp. ! </para> ! </callout> ! <callout arearefs="timestamp2-co" id="timestamp2"> ! <para> ! <literal>name</literal>: The name of a property of .NET type <literal>DateTime</literal>. ! </para> ! </callout> ! <callout arearefs="timestamp3-co" id="timestamp3"> ! <para> ! <literal>access</literal> (optional - defaults to <literal>property</literal>): The ! strategy NHibernate should use for accessing the property value. ! </para> ! </callout> ! </calloutlist> ! </programlistingco> ! ! <para> ! Note that <literal><timestamp></literal> is equivalent to ! <literal><version type="timestamp"></literal>. ! </para> ! </sect2> ! <sect2 id="mapping-declaration-property"> <title>property</title> *************** *** 852,855 **** --- 1063,1070 ---- </para> </sect2> + <!-- + TODO: resume here + <sect2 id="mapping-declaration-manytoone"> + --> </sect1> <sect1 id="mapping-types"> |
Update of /cvsroot/nhibernate/nhibernate/src/NHibernate/Dialect In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv30914/NHibernate/Dialect Modified Files: DB2Dialect.cs FirebirdDialect.cs MsSql2000Dialect.cs MySQLDialect.cs Oracle9Dialect.cs PostgreSQLDialect.cs Log Message: documented the default values of properties for the Dialect. Index: PostgreSQLDialect.cs =================================================================== RCS file: /cvsroot/nhibernate/nhibernate/src/NHibernate/Dialect/PostgreSQLDialect.cs,v retrieving revision 1.13 retrieving revision 1.14 diff -C2 -d -r1.13 -r1.14 *** PostgreSQLDialect.cs 17 Jan 2005 16:25:23 -0000 1.13 --- PostgreSQLDialect.cs 17 Jan 2005 22:31:48 -0000 1.14 *************** *** 9,12 **** --- 9,29 ---- /// An SQL dialect for PostgreSQL. /// </summary> + /// <remarks> + /// The PostgreSQLDialect defaults the following configuration properties: + /// <list type="table"> + /// <listheader> + /// <term>Property</term> + /// <description>Default Value</description> + /// </listheader> + /// <item> + /// <term>hibernate.use_outer_join</term> + /// <description><c>true</c></description> + /// </item> + /// <item> + /// <term>hibernate.connection.driver_class</term> + /// <description><see cref="NHibernate.Driver.NpgsqlDriver" /></description> + /// </item> + /// </list> + /// </remarks> public class PostgreSQLDialect : Dialect { Index: FirebirdDialect.cs =================================================================== RCS file: /cvsroot/nhibernate/nhibernate/src/NHibernate/Dialect/FirebirdDialect.cs,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** FirebirdDialect.cs 17 Jan 2005 16:25:21 -0000 1.9 --- FirebirdDialect.cs 17 Jan 2005 22:31:47 -0000 1.10 *************** *** 7,10 **** --- 7,23 ---- /// Summary description for FirebirdDialect. /// </summary> + /// <remarks> + /// The DB2Dialect defaults the following configuration properties: + /// <list type="table"> + /// <listheader> + /// <term>Property</term> + /// <description>Default Value</description> + /// </listheader> + /// <item> + /// <term>hibernate.connection.driver_class</term> + /// <description><see cref="NHibernate.Driver.FirebirdDriver" /></description> + /// </item> + /// </list> + /// </remarks> public class FirebirdDialect : Dialect { Index: DB2Dialect.cs =================================================================== RCS file: /cvsroot/nhibernate/nhibernate/src/NHibernate/Dialect/DB2Dialect.cs,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** DB2Dialect.cs 17 Jan 2005 16:25:21 -0000 1.7 --- DB2Dialect.cs 17 Jan 2005 22:31:45 -0000 1.8 *************** *** 10,13 **** --- 10,30 ---- /// An SQL dialect for DB2. /// </summary> + /// <remarks> + /// The DB2Dialect defaults the following configuration properties: + /// <list type="table"> + /// <listheader> + /// <term>Property</term> + /// <description>Default Value</description> + /// </listheader> + /// <item> + /// <term>hibernate.use_outer_join</term> + /// <description><c>true</c></description> + /// </item> + /// <item> + /// <term>hibernate.connection.driver_class</term> + /// <description><see cref="NHibernate.Driver.DB2Driver" /></description> + /// </item> + /// </list> + /// </remarks> public class DB2Dialect : Dialect { Index: MsSql2000Dialect.cs =================================================================== RCS file: /cvsroot/nhibernate/nhibernate/src/NHibernate/Dialect/MsSql2000Dialect.cs,v retrieving revision 1.22 retrieving revision 1.23 diff -C2 -d -r1.22 -r1.23 *** MsSql2000Dialect.cs 17 Jan 2005 16:25:21 -0000 1.22 --- MsSql2000Dialect.cs 17 Jan 2005 22:31:48 -0000 1.23 *************** *** 8,11 **** --- 8,28 ---- /// An SQL dialect compatible with Microsoft SQL Server 2000. /// </summary> + /// <remarks> + /// The MsSql2000Dialect defaults the following configuration properties: + /// <list type="table"> + /// <listheader> + /// <term>Property</term> + /// <description>Default Value</description> + /// </listheader> + /// <item> + /// <term>hibernate.use_outer_join</term> + /// <description><c>true</c></description> + /// </item> + /// <item> + /// <term>hibernate.connection.driver_class</term> + /// <description><see cref="NHibernate.Driver.SqlClientDriver" /></description> + /// </item> + /// </list> + /// </remarks> public class MsSql2000Dialect : Dialect { Index: Oracle9Dialect.cs =================================================================== RCS file: /cvsroot/nhibernate/nhibernate/src/NHibernate/Dialect/Oracle9Dialect.cs,v retrieving revision 1.18 retrieving revision 1.19 diff -C2 -d -r1.18 -r1.19 *** Oracle9Dialect.cs 17 Jan 2005 16:25:22 -0000 1.18 --- Oracle9Dialect.cs 17 Jan 2005 22:31:48 -0000 1.19 *************** *** 14,17 **** --- 14,34 ---- /// An SQL dialect for Oracle 9 /// </summary> + /// <remarks> + /// The Oracle9Dialect defaults the following configuration properties: + /// <list type="table"> + /// <listheader> + /// <term>Property</term> + /// <description>Default Value</description> + /// </listheader> + /// <item> + /// <term>hibernate.use_outer_join</term> + /// <description><c>true</c></description> + /// </item> + /// <item> + /// <term>hibernate.connection.driver_class</term> + /// <description><see cref="NHibernate.Driver.OracleClientDriver" /></description> + /// </item> + /// </list> + /// </remarks> public class Oracle9Dialect : Dialect { Index: MySQLDialect.cs =================================================================== RCS file: /cvsroot/nhibernate/nhibernate/src/NHibernate/Dialect/MySQLDialect.cs,v retrieving revision 1.23 retrieving revision 1.24 diff -C2 -d -r1.23 -r1.24 *** MySQLDialect.cs 17 Jan 2005 16:25:21 -0000 1.23 --- MySQLDialect.cs 17 Jan 2005 22:31:48 -0000 1.24 *************** *** 12,15 **** --- 12,32 ---- /// A SQL dialect for MySQL /// </summary> + /// <remarks> + /// The MySQLDialect defaults the following configuration properties: + /// <list type="table"> + /// <listheader> + /// <term>Property</term> + /// <description>Default Value</description> + /// </listheader> + /// <item> + /// <term>hibernate.use_outer_join</term> + /// <description><c>true</c></description> + /// </item> + /// <item> + /// <term>hibernate.connection.driver_class</term> + /// <description><see cref="NHibernate.Driver.MySqlDataDriver" /></description> + /// </item> + /// </list> + /// </remarks> public class MySQLDialect : Dialect { |
From: Michael D. <mik...@us...> - 2005-01-17 22:30:56
|
Update of /cvsroot/nhibernate/nhibernate/src/NHibernate/Persister In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv30603/NHibernate/Persister Modified Files: EntityPersister.cs NormalizedEntityPersister.cs Log Message: improved error messages around bad discriminator values. Index: NormalizedEntityPersister.cs =================================================================== RCS file: /cvsroot/nhibernate/nhibernate/src/NHibernate/Persister/NormalizedEntityPersister.cs,v retrieving revision 1.38 retrieving revision 1.39 diff -C2 -d -r1.38 -r1.39 *** NormalizedEntityPersister.cs 17 Jan 2005 03:40:58 -0000 1.38 --- NormalizedEntityPersister.cs 17 Jan 2005 22:30:39 -0000 1.39 *************** *** 182,186 **** catch( Exception e ) { ! throw new MappingException( "could not format discriminator value to SQL string", e ); } } --- 182,186 ---- catch( Exception e ) { ! throw new MappingException( "Could not format discriminator value '0' to sql string using the IType NHibernate.Types.Int32Type", e ); } } Index: EntityPersister.cs =================================================================== RCS file: /cvsroot/nhibernate/nhibernate/src/NHibernate/Persister/EntityPersister.cs,v retrieving revision 1.34 retrieving revision 1.35 diff -C2 -d -r1.34 -r1.35 *** EntityPersister.cs 31 Dec 2004 21:49:23 -0000 1.34 --- EntityPersister.cs 17 Jan 2005 22:30:36 -0000 1.35 *************** *** 125,129 **** catch( Exception e ) { ! throw new MappingException( "Could not format discriminator value to sql string", e ); } --- 125,133 ---- catch( Exception e ) { ! string msg = String.Format( "Could not format discriminator value '{0}' to sql string using the IType {1}", ! model.DiscriminatorValue, ! model.Discriminator.Type.ToString() ); ! ! throw new MappingException( msg , e ); } |
From: Michael D. <mik...@us...> - 2005-01-17 22:10:41
|
Update of /cvsroot/nhibernate/nhibernate/src/NHibernate/Property In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv25853/NHibernate/Property Modified Files: FieldSetter.cs Log Message: Removed unneeded 'using' Index: FieldSetter.cs =================================================================== RCS file: /cvsroot/nhibernate/nhibernate/src/NHibernate/Property/FieldSetter.cs,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** FieldSetter.cs 17 Jan 2005 05:54:40 -0000 1.4 --- FieldSetter.cs 17 Jan 2005 22:10:23 -0000 1.5 *************** *** 1,5 **** using System; using System.Reflection; - using System.Text; namespace NHibernate.Property --- 1,4 ---- |
Update of /cvsroot/nhibernate/nhibernate/src/NHibernate/Dialect In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv21729/NHibernate/Dialect Modified Files: DB2Dialect.cs FirebirdDialect.cs MsSql2000Dialect.cs MySQLDialect.cs Oracle9Dialect.cs PostgreSQLDialect.cs Log Message: Added default connection.driver_class to Dialects so its one less property that needs to be set in config file. Index: PostgreSQLDialect.cs =================================================================== RCS file: /cvsroot/nhibernate/nhibernate/src/NHibernate/Dialect/PostgreSQLDialect.cs,v retrieving revision 1.12 retrieving revision 1.13 diff -C2 -d -r1.12 -r1.13 *** PostgreSQLDialect.cs 31 Dec 2004 17:07:24 -0000 1.12 --- PostgreSQLDialect.cs 17 Jan 2005 16:25:23 -0000 1.13 *************** *** 40,43 **** --- 40,44 ---- DefaultProperties[ Environment.OuterJoin ] = "true"; + DefaultProperties[ Environment.ConnectionDriver ] = "NHibernate.Driver.NpgsqlDriver"; } Index: FirebirdDialect.cs =================================================================== RCS file: /cvsroot/nhibernate/nhibernate/src/NHibernate/Dialect/FirebirdDialect.cs,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** FirebirdDialect.cs 31 Dec 2004 17:07:24 -0000 1.8 --- FirebirdDialect.cs 17 Jan 2005 16:25:21 -0000 1.9 *************** *** 1,3 **** --- 1,4 ---- using System.Data; + using NHibernate.Cfg; namespace NHibernate.Dialect *************** *** 35,38 **** --- 36,41 ---- Register( DbType.String, 1073741823, "BLOB SUB_TYPE 1" ); // should use the IType.ClobType Register( DbType.Time, "TIME" ); + + DefaultProperties[ Environment.ConnectionDriver ] = "NHibernate.Driver.FirebirdDriver"; } Index: DB2Dialect.cs =================================================================== RCS file: /cvsroot/nhibernate/nhibernate/src/NHibernate/Dialect/DB2Dialect.cs,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** DB2Dialect.cs 31 Dec 2004 17:07:20 -0000 1.6 --- DB2Dialect.cs 17 Jan 2005 16:25:21 -0000 1.7 *************** *** 41,44 **** --- 41,45 ---- DefaultProperties[ Environment.OuterJoin ] = "true"; + DefaultProperties[ Environment.ConnectionDriver ] = "NHibernate.Driver.DB2Driver"; } Index: MsSql2000Dialect.cs =================================================================== RCS file: /cvsroot/nhibernate/nhibernate/src/NHibernate/Dialect/MsSql2000Dialect.cs,v retrieving revision 1.21 retrieving revision 1.22 diff -C2 -d -r1.21 -r1.22 *** MsSql2000Dialect.cs 31 Dec 2004 17:07:24 -0000 1.21 --- MsSql2000Dialect.cs 17 Jan 2005 16:25:21 -0000 1.22 *************** *** 49,52 **** --- 49,53 ---- DefaultProperties[ Environment.OuterJoin ] = "true"; + DefaultProperties[ Environment.ConnectionDriver ] = "NHibernate.Driver.SqlClientDriver"; } Index: Oracle9Dialect.cs =================================================================== RCS file: /cvsroot/nhibernate/nhibernate/src/NHibernate/Dialect/Oracle9Dialect.cs,v retrieving revision 1.17 retrieving revision 1.18 diff -C2 -d -r1.17 -r1.18 *** Oracle9Dialect.cs 17 Jan 2005 03:40:56 -0000 1.17 --- Oracle9Dialect.cs 17 Jan 2005 16:25:22 -0000 1.18 *************** *** 23,26 **** --- 23,27 ---- // DefaultProperties[Cfg.Environment.UseStreamsForBinary] = "true"; DefaultProperties[ Environment.OuterJoin ] = "true"; + DefaultProperties[ Environment.ConnectionDriver ] = "NHibernate.Driver.OracleClientDriver"; Register( DbType.AnsiStringFixedLength, "CHAR(255)" ); Index: MySQLDialect.cs =================================================================== RCS file: /cvsroot/nhibernate/nhibernate/src/NHibernate/Dialect/MySQLDialect.cs,v retrieving revision 1.22 retrieving revision 1.23 diff -C2 -d -r1.22 -r1.23 *** MySQLDialect.cs 31 Dec 2004 17:07:24 -0000 1.22 --- MySQLDialect.cs 17 Jan 2005 16:25:21 -0000 1.23 *************** *** 53,56 **** --- 53,57 ---- DefaultProperties[ Environment.OuterJoin ] = "true"; + DefaultProperties[ Environment.ConnectionDriver ] = "NHibernate.Driver.MySqlDataDriver"; } |
From: Michael D. <mik...@us...> - 2005-01-17 16:24:12
|
Update of /cvsroot/nhibernate/nhibernate/src/NHibernate.Examples/Blogger In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv21467/NHibernate.Examples/Blogger Modified Files: BloggerFixture.cs Log Message: Modified code because of NHibernateUtil rename. Index: BloggerFixture.cs =================================================================== RCS file: /cvsroot/nhibernate/nhibernate/src/NHibernate.Examples/Blogger/BloggerFixture.cs,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** BloggerFixture.cs 17 Aug 2004 17:40:43 -0000 1.1 --- BloggerFixture.cs 17 Jan 2005 16:23:54 -0000 1.2 *************** *** 43,47 **** // reload the blog to verify the db has the correct values ISession s = _sessions.OpenSession(); ! blog = (Blog) s.Find( "from Blog as b where b.Name=:name", "GregBlog", NHibernate.String )[0]; Assert.IsNotNull(blog); Assert.AreEqual( 2, blog.Items.Count ); --- 43,47 ---- // reload the blog to verify the db has the correct values ISession s = _sessions.OpenSession(); ! blog = (Blog) s.Find( "from Blog as b where b.Name=:name", "GregBlog", NHibernateUtil.String )[0]; Assert.IsNotNull(blog); Assert.AreEqual( 2, blog.Items.Count ); |
From: Michael D. <mik...@us...> - 2005-01-17 05:54:50
|
Update of /cvsroot/nhibernate/nhibernate/src/NHibernate/Property In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv2690/NHibernate/Property Modified Files: BasicSetter.cs FieldSetter.cs Log Message: Added better error messages to the setters to help with the problem of ISet and IDictionary. Index: FieldSetter.cs =================================================================== RCS file: /cvsroot/nhibernate/nhibernate/src/NHibernate/Property/FieldSetter.cs,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** FieldSetter.cs 13 Jan 2005 20:55:16 -0000 1.3 --- FieldSetter.cs 17 Jan 2005 05:54:40 -0000 1.4 *************** *** 1,4 **** --- 1,5 ---- using System; using System.Reflection; + using System.Text; namespace NHibernate.Property *************** *** 42,45 **** --- 43,62 ---- field.SetValue( target, value ); } + catch( ArgumentException ae ) + { + // if I'm reading the msdn docs correctly this is the only reason the ArgumentException + // would be thrown, but it doesn't hurt to make sure. + if( field.FieldType.IsAssignableFrom( value.GetType() )==false ) + { + // add some details to the error message - there have been a few forum posts an they are + // all related to an ISet and IDictionary mixups. + string msg = String.Format( "The type {0} can not be assigned to a field of type {1}", value.GetType().ToString(), field.FieldType.ToString() ); + throw new PropertyAccessException( ae, msg, true, clazz, name ); + } + else + { + throw new PropertyAccessException( ae, "ArgumentException while setting the field value by reflection", true, clazz, name ); + } + } catch( Exception e ) { Index: BasicSetter.cs =================================================================== RCS file: /cvsroot/nhibernate/nhibernate/src/NHibernate/Property/BasicSetter.cs,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** BasicSetter.cs 14 Jan 2005 00:28:26 -0000 1.4 --- BasicSetter.cs 17 Jan 2005 05:54:40 -0000 1.5 *************** *** 42,48 **** property.SetValue( target, value, new object[0] ); } catch( Exception e ) { ! throw new PropertyAccessException( e, "Exception occurred", true, clazz, propertyName ); } } --- 42,64 ---- property.SetValue( target, value, new object[0] ); } + catch( ArgumentException ae ) + { + // if I'm reading the msdn docs correctly this is the only reason the ArgumentException + // would be thrown, but it doesn't hurt to make sure. + if( property.PropertyType.IsAssignableFrom( value.GetType() )==false ) + { + // add some details to the error message - there have been a few forum posts an they are + // all related to an ISet and IDictionary mixups. + string msg = String.Format( "The type {0} can not be assigned to a property of type {1}", value.GetType().ToString(), property.PropertyType.ToString() ); + throw new PropertyAccessException( ae, msg, true, clazz, propertyName ); + } + else + { + throw new PropertyAccessException( ae, "ArgumentException while setting the property value by reflection", true, clazz, propertyName ); + } + } catch( Exception e ) { ! throw new PropertyAccessException( e, "could not set a property value by reflection", true, clazz, propertyName ); } } |
From: Michael D. <mik...@us...> - 2005-01-17 05:54:50
|
Update of /cvsroot/nhibernate/nhibernate/src/NHibernate.Test/PropertyTest In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv2690/NHibernate.Test/PropertyTest Added Files: BasicSetterExceptionFixture.cs FieldSetterExceptionFixture.cs Log Message: Added better error messages to the setters to help with the problem of ISet and IDictionary. --- NEW FILE: BasicSetterExceptionFixture.cs --- using System; using NHibernate.Property; using NUnit.Framework; namespace NHibernate.Test.PropertyTest { /// <summary> /// Test the exception messages that come out a BasicSetter when /// invalid values are passed in. /// </summary> [TestFixture] public class BasicSetterExceptionFixture { protected IPropertyAccessor _accessor; protected ISetter _setter; [SetUp] public void SetUp() { _accessor = PropertyAccessorFactory.GetPropertyAccessor("property"); _setter = _accessor.GetSetter( typeof(BasicSetterExceptionFixture.A), "Id" ); } [Test] [ExpectedException( typeof(PropertyAccessException), "The type System.String can not be assigned to a property of type System.Int32 setter of NHibernate.Test.PropertyTest.BasicSetterExceptionFixture+A.Id" )] public void SetInvalidType() { A instance = new A(); _setter.Set( instance, "wrong type" ); } [Test] [ExpectedException( typeof(PropertyAccessException), "could not set a property value by reflection setter of NHibernate.Test.PropertyTest.BasicSetterExceptionFixture+A.Id" )] public void SetValueArgumentException() { A instance = new A(); // this will throw a TargetInvocationException that gets wrapped in a PropertyAccessException _setter.Set( instance, 5 ); } public class A { private int _id = 0; public int Id { get { return _id; } set { if( value==5 ) { throw new ArgumentException( "can't be 5 for testing purposes"); } _id = value; } } } } } --- NEW FILE: FieldSetterExceptionFixture.cs --- using System; using NHibernate.Property; using NUnit.Framework; namespace NHibernate.Test.PropertyTest { /// <summary> /// Test the exception messages that come out a FieldSetter when /// invalid values are passed in. /// </summary> [TestFixture] public class FieldSetterExceptionFixture { protected IPropertyAccessor _accessor; protected ISetter _setter; [SetUp] public void SetUp() { _accessor = PropertyAccessorFactory.GetPropertyAccessor("field"); _setter = _accessor.GetSetter( typeof(FieldSetterExceptionFixture.A), "Id" ); } [Test] [ExpectedException( typeof(PropertyAccessException), "The type System.String can not be assigned to a field of type System.Int32 setter of NHibernate.Test.PropertyTest.FieldSetterExceptionFixture+A.Id" )] public void SetInvalidType() { A instance = new A(); _setter.Set( instance, "wrong type" ); } public class A { public int Id = 0; } } } |
From: Michael D. <mik...@us...> - 2005-01-17 05:54:49
|
Update of /cvsroot/nhibernate/nhibernate/src/NHibernate.Test In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv2690/NHibernate.Test Modified Files: NHibernate.Test-1.1.csproj Log Message: Added better error messages to the setters to help with the problem of ISet and IDictionary. Index: NHibernate.Test-1.1.csproj =================================================================== RCS file: /cvsroot/nhibernate/nhibernate/src/NHibernate.Test/NHibernate.Test-1.1.csproj,v retrieving revision 1.60 retrieving revision 1.61 diff -C2 -d -r1.60 -r1.61 *** NHibernate.Test-1.1.csproj 5 Jan 2005 02:44:17 -0000 1.60 --- NHibernate.Test-1.1.csproj 17 Jan 2005 05:54:37 -0000 1.61 *************** *** 468,471 **** --- 468,476 ---- /> <File + RelPath = "PropertyTest\BasicSetterExceptionFixture.cs" + SubType = "Code" + BuildAction = "Compile" + /> + <File RelPath = "PropertyTest\FieldAccessorFixture.cs" SubType = "Code" *************** *** 503,506 **** --- 508,516 ---- /> <File + RelPath = "PropertyTest\FieldSetterExceptionFixture.cs" + SubType = "Code" + BuildAction = "Compile" + /> + <File RelPath = "PropertyTest\NoSetterAccessorFixture.cs" SubType = "Code" |
Update of /cvsroot/nhibernate/nhibernate/src/NHibernate.Test/TypesTest In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv11286/NHibernate.Test/TypesTest Modified Files: BinaryTypeFixture.cs BooleanTypeFixture.cs ByteTypeFixture.cs DateTimeTypeFixture.cs DecimalTypeFixture.cs DoubleTypeFixture.cs GuidTypeFixture.cs Int16TypeFixture.cs Int32TypeFixture.cs Int64TypeFixture.cs PersistentEnumTypeFixture.cs SByteTypeFixture.cs TicksTypeFixture.cs TimeSpanTypeFixture.cs TimestampTypeFixture.cs TypeFactoryFixture.cs Log Message: Renamed NHibernate.NHibernate to NHibernate.NHibernateUtil. Index: Int16TypeFixture.cs =================================================================== RCS file: /cvsroot/nhibernate/nhibernate/src/NHibernate.Test/TypesTest/Int16TypeFixture.cs,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** Int16TypeFixture.cs 20 Nov 2004 21:13:03 -0000 1.1 --- Int16TypeFixture.cs 17 Jan 2005 03:40:54 -0000 1.2 *************** *** 16,20 **** public void Next() { ! Int16Type type = (Int16Type)NHibernate.Int16; object current = (short)1; object next = type.Next( current ); --- 16,20 ---- public void Next() { ! Int16Type type = (Int16Type)NHibernateUtil.Int16; object current = (short)1; object next = type.Next( current ); *************** *** 28,32 **** public void Seed() { ! Int16Type type = (Int16Type)NHibernate.Int16; Assert.IsTrue( type.Seed is Int16, "seed should be int16" ); } --- 28,32 ---- public void Seed() { ! Int16Type type = (Int16Type)NHibernateUtil.Int16; Assert.IsTrue( type.Seed is Int16, "seed should be int16" ); } Index: GuidTypeFixture.cs =================================================================== RCS file: /cvsroot/nhibernate/nhibernate/src/NHibernate.Test/TypesTest/GuidTypeFixture.cs,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** GuidTypeFixture.cs 30 Dec 2004 16:25:19 -0000 1.4 --- GuidTypeFixture.cs 17 Jan 2005 03:40:54 -0000 1.5 *************** *** 48,52 **** public void Equals() { ! GuidType type = (GuidType)NHibernate.Guid; Guid lhs = new Guid("{01234567-abcd-abcd-abcd-0123456789ab}"); --- 48,52 ---- public void Equals() { ! GuidType type = (GuidType)NHibernateUtil.Guid; Guid lhs = new Guid("{01234567-abcd-abcd-abcd-0123456789ab}"); Index: DecimalTypeFixture.cs =================================================================== RCS file: /cvsroot/nhibernate/nhibernate/src/NHibernate.Test/TypesTest/DecimalTypeFixture.cs,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** DecimalTypeFixture.cs 30 Dec 2004 16:25:19 -0000 1.3 --- DecimalTypeFixture.cs 17 Jan 2005 03:40:54 -0000 1.4 *************** *** 52,56 **** decimal rhs = 5.64351M; ! DecimalType type = (DecimalType)NHibernate.Decimal; Assert.IsTrue( type.Equals(lhs, rhs) ); --- 52,56 ---- decimal rhs = 5.64351M; ! DecimalType type = (DecimalType)NHibernateUtil.Decimal; Assert.IsTrue( type.Equals(lhs, rhs) ); Index: TicksTypeFixture.cs =================================================================== RCS file: /cvsroot/nhibernate/nhibernate/src/NHibernate.Test/TypesTest/TicksTypeFixture.cs,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** TicksTypeFixture.cs 20 Nov 2004 21:13:03 -0000 1.1 --- TicksTypeFixture.cs 17 Jan 2005 03:40:54 -0000 1.2 *************** *** 16,20 **** public void Next() { ! TicksType type = (TicksType)NHibernate.Ticks; object current = new DateTime( 2004, 1, 1, 1, 1, 1, 1 ); object next = type.Next( current ); --- 16,20 ---- public void Next() { ! TicksType type = (TicksType)NHibernateUtil.Ticks; object current = new DateTime( 2004, 1, 1, 1, 1, 1, 1 ); object next = type.Next( current ); *************** *** 28,32 **** public void Seed() { ! TicksType type = (TicksType)NHibernate.Ticks; Assert.IsTrue( type.Seed is DateTime, "seed should be DateTime" ); } --- 28,32 ---- public void Seed() { ! TicksType type = (TicksType)NHibernateUtil.Ticks; Assert.IsTrue( type.Seed is DateTime, "seed should be DateTime" ); } Index: BinaryTypeFixture.cs =================================================================== RCS file: /cvsroot/nhibernate/nhibernate/src/NHibernate.Test/TypesTest/BinaryTypeFixture.cs,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** BinaryTypeFixture.cs 12 Dec 2004 07:18:27 -0000 1.1 --- BinaryTypeFixture.cs 17 Jan 2005 03:40:54 -0000 1.2 *************** *** 56,60 **** public void Equals() { ! BinaryType type = (BinaryType)NHibernate.Binary; byte[] expected = System.Text.Encoding.UTF8.GetBytes("ghij1`23%$"); --- 56,60 ---- public void Equals() { ! BinaryType type = (BinaryType)NHibernateUtil.Binary; byte[] expected = System.Text.Encoding.UTF8.GetBytes("ghij1`23%$"); Index: DoubleTypeFixture.cs =================================================================== RCS file: /cvsroot/nhibernate/nhibernate/src/NHibernate.Test/TypesTest/DoubleTypeFixture.cs,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** DoubleTypeFixture.cs 12 Dec 2004 07:18:27 -0000 1.1 --- DoubleTypeFixture.cs 17 Jan 2005 03:40:54 -0000 1.2 *************** *** 60,64 **** public void Equals() { ! DoubleType type = (DoubleType)NHibernate.Double; Assert.IsTrue( type.Equals( 1.5e20, 1.5e20 ) ); --- 60,64 ---- public void Equals() { ! DoubleType type = (DoubleType)NHibernateUtil.Double; Assert.IsTrue( type.Equals( 1.5e20, 1.5e20 ) ); Index: Int64TypeFixture.cs =================================================================== RCS file: /cvsroot/nhibernate/nhibernate/src/NHibernate.Test/TypesTest/Int64TypeFixture.cs,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** Int64TypeFixture.cs 20 Nov 2004 21:13:03 -0000 1.1 --- Int64TypeFixture.cs 17 Jan 2005 03:40:54 -0000 1.2 *************** *** 16,20 **** public void Next() { ! Int64Type type = (Int64Type)NHibernate.Int64; object current = (long)1; object next = type.Next( current ); --- 16,20 ---- public void Next() { ! Int64Type type = (Int64Type)NHibernateUtil.Int64; object current = (long)1; object next = type.Next( current ); *************** *** 28,32 **** public void Seed() { ! Int64Type type = (Int64Type)NHibernate.Int64; Assert.IsTrue( type.Seed is Int64, "seed should be int64" ); } --- 28,32 ---- public void Seed() { ! Int64Type type = (Int64Type)NHibernateUtil.Int64; Assert.IsTrue( type.Seed is Int64, "seed should be int64" ); } Index: TimeSpanTypeFixture.cs =================================================================== RCS file: /cvsroot/nhibernate/nhibernate/src/NHibernate.Test/TypesTest/TimeSpanTypeFixture.cs,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** TimeSpanTypeFixture.cs 20 Nov 2004 21:13:03 -0000 1.1 --- TimeSpanTypeFixture.cs 17 Jan 2005 03:40:54 -0000 1.2 *************** *** 16,20 **** public void Next() { ! TimeSpanType type = (TimeSpanType)NHibernate.TimeSpan; object current = new TimeSpan( DateTime.Now.Ticks - 5 ); object next = type.Next( current ); --- 16,20 ---- public void Next() { ! TimeSpanType type = (TimeSpanType)NHibernateUtil.TimeSpan; object current = new TimeSpan( DateTime.Now.Ticks - 5 ); object next = type.Next( current ); *************** *** 28,32 **** public void Seed() { ! TimeSpanType type = (TimeSpanType)NHibernate.TimeSpan; Assert.IsTrue( type.Seed is TimeSpan, "seed should be TimeSpan" ); } --- 28,32 ---- public void Seed() { ! TimeSpanType type = (TimeSpanType)NHibernateUtil.TimeSpan; Assert.IsTrue( type.Seed is TimeSpan, "seed should be TimeSpan" ); } Index: DateTimeTypeFixture.cs =================================================================== RCS file: /cvsroot/nhibernate/nhibernate/src/NHibernate.Test/TypesTest/DateTimeTypeFixture.cs,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** DateTimeTypeFixture.cs 20 Nov 2004 21:12:52 -0000 1.3 --- DateTimeTypeFixture.cs 17 Jan 2005 03:40:54 -0000 1.4 *************** *** 17,21 **** public void Next() { ! DateTimeType type = (DateTimeType)NHibernate.DateTime; object current = DateTime.Parse( "2004-01-01" ); object next = type.Next( current ); --- 17,21 ---- public void Next() { ! DateTimeType type = (DateTimeType)NHibernateUtil.DateTime; object current = DateTime.Parse( "2004-01-01" ); object next = type.Next( current ); *************** *** 29,33 **** public void Seed() { ! DateTimeType type = (DateTimeType)NHibernate.DateTime; Assert.IsTrue( type.Seed is DateTime, "seed should be DateTime" ); } --- 29,33 ---- public void Seed() { ! DateTimeType type = (DateTimeType)NHibernateUtil.DateTime; Assert.IsTrue( type.Seed is DateTime, "seed should be DateTime" ); } *************** *** 36,40 **** public void DeepCopyNotNull() { ! NullableType type = NHibernate.DateTime; object value1 = DateTime.Now; --- 36,40 ---- public void DeepCopyNotNull() { ! NullableType type = NHibernateUtil.DateTime; object value1 = DateTime.Now; Index: TypeFactoryFixture.cs =================================================================== RCS file: /cvsroot/nhibernate/nhibernate/src/NHibernate.Test/TypesTest/TypeFactoryFixture.cs,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** TypeFactoryFixture.cs 14 Apr 2004 18:08:28 -0000 1.1 --- TypeFactoryFixture.cs 17 Jan 2005 03:40:54 -0000 1.2 *************** *** 47,51 **** public void GetDefaultString() { ! NullableType stringFromNH = NHibernate.String; NullableType stringFromTF = TypeFactory.GetStringType(); --- 47,51 ---- public void GetDefaultString() { ! NullableType stringFromNH = NHibernateUtil.String; NullableType stringFromTF = TypeFactory.GetStringType(); Index: BooleanTypeFixture.cs =================================================================== RCS file: /cvsroot/nhibernate/nhibernate/src/NHibernate.Test/TypesTest/BooleanTypeFixture.cs,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** BooleanTypeFixture.cs 30 Dec 2004 16:25:13 -0000 1.3 --- BooleanTypeFixture.cs 17 Jan 2005 03:40:54 -0000 1.4 *************** *** 48,52 **** public void Equals() { ! BooleanType type = (BooleanType)NHibernate.Boolean; Assert.IsTrue( type.Equals( true, true ) ); --- 48,52 ---- public void Equals() { ! BooleanType type = (BooleanType)NHibernateUtil.Boolean; Assert.IsTrue( type.Equals( true, true ) ); Index: TimestampTypeFixture.cs =================================================================== RCS file: /cvsroot/nhibernate/nhibernate/src/NHibernate.Test/TypesTest/TimestampTypeFixture.cs,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** TimestampTypeFixture.cs 20 Nov 2004 21:13:03 -0000 1.1 --- TimestampTypeFixture.cs 17 Jan 2005 03:40:54 -0000 1.2 *************** *** 16,20 **** public void Next() { ! TimestampType type = (TimestampType)NHibernate.Timestamp; object current = DateTime.Parse( "2004-01-01" ); object next = type.Next( current ); --- 16,20 ---- public void Next() { ! TimestampType type = (TimestampType)NHibernateUtil.Timestamp; object current = DateTime.Parse( "2004-01-01" ); object next = type.Next( current ); *************** *** 28,32 **** public void Seed() { ! TimestampType type = (TimestampType)NHibernate.Timestamp; Assert.IsTrue( type.Seed is DateTime, "seed should be DateTime" ); } --- 28,32 ---- public void Seed() { ! TimestampType type = (TimestampType)NHibernateUtil.Timestamp; Assert.IsTrue( type.Seed is DateTime, "seed should be DateTime" ); } Index: ByteTypeFixture.cs =================================================================== RCS file: /cvsroot/nhibernate/nhibernate/src/NHibernate.Test/TypesTest/ByteTypeFixture.cs,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** ByteTypeFixture.cs 30 Dec 2004 16:25:19 -0000 1.3 --- ByteTypeFixture.cs 17 Jan 2005 03:40:54 -0000 1.4 *************** *** 48,52 **** public void Equals() { ! ByteType type = (ByteType)NHibernate.Byte; Assert.IsTrue( type.Equals( (byte)5, (byte)5 ) ); --- 48,52 ---- public void Equals() { ! ByteType type = (ByteType)NHibernateUtil.Byte; Assert.IsTrue( type.Equals( (byte)5, (byte)5 ) ); Index: PersistentEnumTypeFixture.cs =================================================================== RCS file: /cvsroot/nhibernate/nhibernate/src/NHibernate.Test/TypesTest/PersistentEnumTypeFixture.cs,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** PersistentEnumTypeFixture.cs 30 Dec 2004 16:25:19 -0000 1.2 --- PersistentEnumTypeFixture.cs 17 Jan 2005 03:40:54 -0000 1.3 *************** *** 31,35 **** public void EqualsTrue() { ! IType type = NHibernate.Enum(typeof(A)); A lhs = A.One; --- 31,35 ---- public void EqualsTrue() { ! IType type = NHibernateUtil.Enum(typeof(A)); A lhs = A.One; *************** *** 46,50 **** public void EqualsFalseSameUnderlyingValue() { ! IType type = NHibernate.Enum(typeof(A)); A lhs = A.One; --- 46,50 ---- public void EqualsFalseSameUnderlyingValue() { ! IType type = NHibernateUtil.Enum(typeof(A)); A lhs = A.One; *************** *** 57,61 **** public void EqualsFalse() { ! IType type = NHibernate.Enum(typeof(A)); A lhs = A.One; --- 57,61 ---- public void EqualsFalse() { ! IType type = NHibernateUtil.Enum(typeof(A)); A lhs = A.One; Index: Int32TypeFixture.cs =================================================================== RCS file: /cvsroot/nhibernate/nhibernate/src/NHibernate.Test/TypesTest/Int32TypeFixture.cs,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** Int32TypeFixture.cs 20 Nov 2004 21:13:03 -0000 1.1 --- Int32TypeFixture.cs 17 Jan 2005 03:40:54 -0000 1.2 *************** *** 16,20 **** public void Next() { ! Int32Type type = (Int32Type)NHibernate.Int32; object current = (int)1; object next = type.Next( current ); --- 16,20 ---- public void Next() { ! Int32Type type = (Int32Type)NHibernateUtil.Int32; object current = (int)1; object next = type.Next( current ); *************** *** 28,32 **** public void Seed() { ! Int32Type type = (Int32Type)NHibernate.Int32; Assert.IsTrue( type.Seed is Int32, "seed should be Int32" ); } --- 28,32 ---- public void Seed() { ! Int32Type type = (Int32Type)NHibernateUtil.Int32; Assert.IsTrue( type.Seed is Int32, "seed should be Int32" ); } Index: SByteTypeFixture.cs =================================================================== RCS file: /cvsroot/nhibernate/nhibernate/src/NHibernate.Test/TypesTest/SByteTypeFixture.cs,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** SByteTypeFixture.cs 11 Dec 2004 20:08:19 -0000 1.1 --- SByteTypeFixture.cs 17 Jan 2005 03:40:54 -0000 1.2 *************** *** 16,20 **** public void Equals() { ! SByteType type = (SByteType)NHibernate.SByte; Assert.IsTrue( type.Equals( (sbyte)-1, (sbyte)-1 ) ); --- 16,20 ---- public void Equals() { ! SByteType type = (SByteType)NHibernateUtil.SByte; Assert.IsTrue( type.Equals( (sbyte)-1, (sbyte)-1 ) ); *************** *** 25,29 **** public void ObjectToSQLString() { ! SByteType type = (SByteType)NHibernate.SByte; Assert.AreEqual( "-1", type.ObjectToSQLString( (sbyte)-1 ) ); } --- 25,29 ---- public void ObjectToSQLString() { ! SByteType type = (SByteType)NHibernateUtil.SByte; Assert.AreEqual( "-1", type.ObjectToSQLString( (sbyte)-1 ) ); } *************** *** 32,36 **** public void StringToObject() { ! SByteType type = (SByteType)NHibernate.SByte; Assert.AreEqual( (sbyte)-1, type.StringToObject( "-1" ) ); } --- 32,36 ---- public void StringToObject() { ! SByteType type = (SByteType)NHibernateUtil.SByte; Assert.AreEqual( (sbyte)-1, type.StringToObject( "-1" ) ); } |
From: Michael D. <mik...@us...> - 2005-01-17 03:41:45
|
Update of /cvsroot/nhibernate/nhibernate/src/NHibernate.DomainModel In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv11286/NHibernate.DomainModel Modified Files: Baz.cs CustomPersister.cs DoubleStringType.cs MultiplicityType.cs Log Message: Renamed NHibernate.NHibernate to NHibernate.NHibernateUtil. Index: MultiplicityType.cs =================================================================== RCS file: /cvsroot/nhibernate/nhibernate/src/NHibernate.DomainModel/MultiplicityType.cs,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** MultiplicityType.cs 3 Jun 2004 14:29:00 -0000 1.2 --- MultiplicityType.cs 17 Jan 2005 03:40:49 -0000 1.3 *************** *** 5,9 **** { public class MultiplicityType : ICompositeUserType ! { private static readonly string[] PROP_NAMES = new String[] { "count", "glarch" }; private static readonly Type.IType[] TYPES = new Type.IType[] { NHibernate.Int32, NHibernate.Entity(typeof(Glarch)) }; public String[] PropertyNames { get { return PROP_NAMES; } } public Type.IType[] PropertyTypes --- 5,9 ---- { public class MultiplicityType : ICompositeUserType ! { private static readonly string[] PROP_NAMES = new String[] { "count", "glarch" }; private static readonly Type.IType[] TYPES = new Type.IType[] { NHibernateUtil.Int32, NHibernateUtil.Entity(typeof(Glarch)) }; public String[] PropertyNames { get { return PROP_NAMES; } } public Type.IType[] PropertyTypes *************** *** 23,28 **** if (mx==null || my==null) return false; return mx.count==my.count && mx.glarch==my.glarch; } public object NullSafeGet(IDataReader rs, String[] names, Engine.ISessionImplementor session, Object owner) { ! int c = (int) NHibernate.Int32.NullSafeGet( rs, names[0], session, owner); ! GlarchProxy g = (GlarchProxy) NHibernate.Entity(typeof(Glarch)).NullSafeGet(rs, names[1], session, owner); Multiplicity m = new Multiplicity(); m.count = ( c==0 ? 0 : c ); --- 23,28 ---- if (mx==null || my==null) return false; return mx.count==my.count && mx.glarch==my.glarch; } public object NullSafeGet(IDataReader rs, String[] names, Engine.ISessionImplementor session, Object owner) { ! int c = (int) NHibernateUtil.Int32.NullSafeGet( rs, names[0], session, owner); ! GlarchProxy g = (GlarchProxy) NHibernateUtil.Entity(typeof(Glarch)).NullSafeGet(rs, names[1], session, owner); Multiplicity m = new Multiplicity(); m.count = ( c==0 ? 0 : c ); *************** *** 45,50 **** c = o.count; } ! NHibernate.Int32.NullSafeSet(st, c, index, session); ! NHibernate.Entity(typeof(Glarch)).NullSafeSet(st, g, index+1, session); } public object DeepCopy(object value) { if (value==null) return null; Multiplicity v = (Multiplicity) value; --- 45,50 ---- c = o.count; } ! NHibernateUtil.Int32.NullSafeSet(st, c, index, session); ! NHibernateUtil.Entity(typeof(Glarch)).NullSafeSet(st, g, index+1, session); } public object DeepCopy(object value) { if (value==null) return null; Multiplicity v = (Multiplicity) value; Index: DoubleStringType.cs =================================================================== RCS file: /cvsroot/nhibernate/nhibernate/src/NHibernate.DomainModel/DoubleStringType.cs,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** DoubleStringType.cs 21 Aug 2004 16:39:00 -0000 1.3 --- DoubleStringType.cs 17 Jan 2005 03:40:49 -0000 1.4 *************** *** 43,48 **** { ! String first = (String) NHibernate.String.NullSafeGet(rs, names[0], session, owner); ! String second = (String) NHibernate.String.NullSafeGet(rs, names[1], session, owner); return ( first==null && second==null ) ? null : new String[] { first, second }; --- 43,48 ---- { ! String first = (String) NHibernateUtil.String.NullSafeGet(rs, names[0], session, owner); ! String second = (String) NHibernateUtil.String.NullSafeGet(rs, names[1], session, owner); return ( first==null && second==null ) ? null : new String[] { first, second }; *************** *** 54,59 **** String[] strings = (value==null) ? new String[2] : (String[]) value; ! NHibernate.String.NullSafeSet(st, strings[0], index, session); ! NHibernate.String.NullSafeSet(st, strings[1], index+1, session); } --- 54,59 ---- String[] strings = (value==null) ? new String[2] : (String[]) value; ! NHibernateUtil.String.NullSafeSet(st, strings[0], index, session); ! NHibernateUtil.String.NullSafeSet(st, strings[1], index+1, session); } *************** *** 70,74 **** get { ! return new Type.IType[] { NHibernate.String, NHibernate.String }; } } --- 70,74 ---- get { ! return new Type.IType[] { NHibernateUtil.String, NHibernateUtil.String }; } } Index: CustomPersister.cs =================================================================== RCS file: /cvsroot/nhibernate/nhibernate/src/NHibernate.DomainModel/CustomPersister.cs,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** CustomPersister.cs 14 Aug 2004 14:52:01 -0000 1.2 --- CustomPersister.cs 17 Jan 2005 03:40:49 -0000 1.3 *************** *** 22,26 **** private static readonly IIdentifierGenerator Generator = new CounterGenerator(); ! private static readonly IType[] Types = new IType[] { NHibernate.String }; private static readonly string[] Names = new string[] { "name" }; private static readonly bool[] Mutability = new bool[] { true }; --- 22,26 ---- private static readonly IIdentifierGenerator Generator = new CounterGenerator(); ! private static readonly IType[] Types = new IType[] { NHibernateUtil.String }; private static readonly string[] Names = new string[] { "name" }; private static readonly bool[] Mutability = new bool[] { true }; *************** *** 200,204 **** public IType IdentifierType { ! get { return NHibernate.Int64; } } --- 200,204 ---- public IType IdentifierType { ! get { return NHibernateUtil.Int64; } } Index: Baz.cs =================================================================== RCS file: /cvsroot/nhibernate/nhibernate/src/NHibernate.DomainModel/Baz.cs,v retrieving revision 1.13 retrieving revision 1.14 diff -C2 -d -r1.13 -r1.14 *** Baz.cs 20 Dec 2004 05:06:29 -0000 1.13 --- Baz.cs 17 Jan 2005 03:40:49 -0000 1.14 *************** *** 557,561 **** StringDateMap.Add( "now", DateTime.Now ); StringDateMap.Add( "never", null ); ! StringDateMap.Add( "big bang", new DateTime(0) ); ArrayList list = new ArrayList(); list.AddRange( StringSet ); --- 557,562 ---- StringDateMap.Add( "now", DateTime.Now ); StringDateMap.Add( "never", null ); ! StringDateMap.Add( "millenium", new DateTime( 2000, 01, 01 ) ); ! //StringDateMap.Add( "big bang", new DateTime(0) ); ArrayList list = new ArrayList(); list.AddRange( StringSet ); |
From: Michael D. <mik...@us...> - 2005-01-17 03:41:44
|
Update of /cvsroot/nhibernate/nhibernate/src/NHibernate In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv11286/NHibernate Modified Files: NHibernate-1.1.csproj Added Files: NHibernateUtil.cs Removed Files: NHibernate.cs Log Message: Renamed NHibernate.NHibernate to NHibernate.NHibernateUtil. Index: NHibernate-1.1.csproj =================================================================== RCS file: /cvsroot/nhibernate/nhibernate/src/NHibernate/NHibernate-1.1.csproj,v retrieving revision 1.67 retrieving revision 1.68 diff -C2 -d -r1.67 -r1.68 *** NHibernate-1.1.csproj 15 Jan 2005 21:17:55 -0000 1.67 --- NHibernate-1.1.csproj 17 Jan 2005 03:40:49 -0000 1.68 *************** *** 223,231 **** /> <File - RelPath = "NHibernate.cs" - SubType = "Code" - BuildAction = "Compile" - /> - <File RelPath = "nhibernate-configuration-2.0.xsd" BuildAction = "EmbeddedResource" --- 223,226 ---- *************** *** 250,253 **** --- 245,253 ---- /> <File + RelPath = "NHibernateUtil.cs" + SubType = "Code" + BuildAction = "Compile" + /> + <File RelPath = "ObjectDeletedException.cs" SubType = "Code" --- NEW FILE: NHibernateUtil.cs --- using System; using NHibernate.Collection; using NHibernate.Proxy; using NHibernate.Type; namespace NHibernate { /// <summary> /// Provides access to the full range of NHibernate built-in types. /// IType instances may be used to bind values to query parameters. /// Also a factory for new Blobs and Clobs. /// </summary> public sealed class NHibernateUtil { /// <summary> /// NHibernate Ansi String type /// </summary> public static readonly NullableType AnsiString = new AnsiStringType(); /// <summary> /// NHibernate binary type /// </summary> public static readonly NullableType Binary = new BinaryType(); /// <summary> /// NHibernate binary blob type /// </summary> public static readonly NullableType BinaryBlob = new BinaryBlobType(); /// <summary> /// NHibernate boolean type /// </summary> public static readonly NullableType Boolean = new BooleanType(); /// <summary> /// NHibernate byte type /// </summary> public static readonly NullableType Byte = new ByteType(); /// <summary> /// NHibernate character type /// </summary> public static readonly NullableType Character = new CharType(); /// <summary> /// NHibernate Culture Info type /// </summary> public static readonly NullableType CultureInfo = new CultureInfoType(); /// <summary> /// NHibernate date type /// </summary> public static readonly NullableType DateTime = new DateTimeType(); /// <summary> /// NHibernate date type /// </summary> public static readonly NullableType Date = new DateType(); /// <summary> /// NHibernate decimal type /// </summary> public static readonly NullableType Decimal = new DecimalType(); /// <summary> /// NHibernate double type /// </summary> public static readonly NullableType Double = new DoubleType(); /// <summary> /// NHibernate Guid type. /// </summary> public static readonly NullableType Guid = new GuidType(); /// <summary> /// NHibernate System.Int16 (short in C#) type /// </summary> public static readonly NullableType Int16 = new Int16Type(); /// <summary> /// NHibernate System.Int32 (int in C#) type /// </summary> public static readonly NullableType Int32 = new Int32Type(); /// <summary> /// NHibernate System.Int64 (long in C#) type /// </summary> public static readonly NullableType Int64 = new Int64Type(); /// <summary> /// NHibernate System.SByte type /// </summary> public static readonly NullableType SByte = new SByteType(); /// <summary> /// NHIbernate System.Single (float in C#) Type /// </summary> public static readonly NullableType Single = new SingleType(); /// <summary> /// NHibernate String type /// </summary> public static readonly NullableType String = new StringType(); /// <summary> /// NHibernate string clob type /// </summary> public static readonly NullableType StringClob = new StringClobType(); /// <summary> /// NHibernate Time type /// </summary> public static readonly NullableType Time = new TimeType(); /// <summary> /// NHibernate Ticks type /// </summary> public static readonly NullableType Ticks = new TicksType(); /// <summary> /// NHibernate Ticks type /// </summary> public static readonly NullableType TimeSpan = new TimeSpanType(); /// <summary> /// NHibernate Timestamp type /// </summary> public static readonly NullableType Timestamp = new TimestampType(); /// <summary> /// NHibernate TrueFalse type /// </summary> public static readonly NullableType TrueFalse = new TrueFalseType(); /// <summary> /// NHibernate YesNo type /// </summary> public static readonly NullableType YesNo = new YesNoType(); /// <summary> /// NHibernate class type /// </summary> public static readonly NullableType Class = new TypeType(); /// <summary> /// NHibernate serializable type /// </summary> public static readonly NullableType Serializable = new SerializableType(); /// <summary> /// NHibernate System.Object type /// </summary> public static readonly IType Object = new ObjectType(); // /// <summary> // /// NHibernate blob type // /// </summary> // public static readonly NullableType Blob = new BlobType(); // /// <summary> // /// NHibernate clob type // /// </summary> // public static readonly NullableType Clob = new ClobType(); /// <summary> /// Cannot be instantiated. /// </summary> private NHibernateUtil() { throw new NotSupportedException(); } /// <summary> /// A NHibernate persistent enum type /// </summary> /// <param name="enumClass"></param> /// <returns></returns> public static IType Enum( System.Type enumClass ) { return new PersistentEnumType( enumClass ); } /// <summary> /// A NHibernate serializable type /// </summary> /// <param name="serializableClass"></param> /// <returns></returns> public static IType GetSerializable( System.Type serializableClass ) { return new SerializableType( serializableClass ); } /// <summary> /// A NHibernate serializable type /// </summary> /// <param name="metaType">a type mapping <see cref="Type.IType"/> to a single column</param> /// <param name="identifierType">the entity identifier type</param> /// <returns></returns> public static IType Any( IType metaType, IType identifierType ) { return new ObjectType( metaType, identifierType ); } /// <summary> /// A NHibernate persistent object (entity) type /// </summary> /// <param name="persistentClass">a mapped entity class</param> /// <returns></returns> [Obsolete( "use NHibernate.Entity instead" )] public static IType Association( System.Type persistentClass ) { // not really a many-to-one association *necessarily* return new ManyToOneType( persistentClass ); } /// <summary> /// A NHibernate persistent object (entity) type /// </summary> /// <param name="persistentClass">a mapped entity class</param> /// <returns></returns> public static IType Entity( System.Type persistentClass ) { // not really a many-to-one association *necessarily* return new ManyToOneType( persistentClass ); } /// <summary> /// A NHibernate custom type /// </summary> /// <param name="userTypeClass">a class that implements UserType</param> /// <returns></returns> public static IType Custom( System.Type userTypeClass ) { if( typeof( ICompositeUserType ).IsAssignableFrom( userTypeClass ) ) { return new CompositeCustomType( userTypeClass ); } else { return new CustomType( userTypeClass ); } } /// <summary> /// Force initialization of a proxy or persistent collection. /// </summary> /// <param name="proxy">a persistable object, proxy, persistent collection or null</param> /// <exception cref="HibernateException">if we can't initialize the proxy at this time, eg. the Session was closed</exception> public static void Initialize( object proxy ) { if( proxy == null ) { return; } else if( proxy is INHibernateProxy ) { NHibernateProxyHelper.GetLazyInitializer( ( INHibernateProxy ) proxy ).Initialize(); } else if( proxy is PersistentCollection ) { ( ( PersistentCollection ) proxy ).ForceLoad(); } } /// <summary> /// Is the proxy or persistent collection initialized? /// </summary> /// <param name="proxy">a persistable object, proxy, persistent collection or null</param> /// <returns>true if the argument is already initialized, or is not a proxy or collection</returns> public static bool IsInitialized( object proxy ) { if( proxy is INHibernateProxy ) { return !NHibernateProxyHelper.GetLazyInitializer( ( INHibernateProxy ) proxy ).IsUninitialized; } else if( proxy is PersistentCollection ) { return ( ( PersistentCollection ) proxy ).WasInitialized; } else { return true; } } /// <summary> /// Get the true, underlying class of a proxied persistent class. This operation /// will initialize a proxy by side-effect. /// </summary> /// <param name="proxy">a persistable object or proxy</param> /// <returns>the true class of the instance</returns> public static System.Type GetClass( object proxy ) { if( proxy is INHibernateProxy ) { return NHibernateProxyHelper.GetLazyInitializer( ( INHibernateProxy ) proxy ).GetImplementation().GetType(); } else { return proxy.GetType(); } } /* /// <summary> /// Create a new Blob. The returned object will be initially immutable. /// </summary> /// <param name="bytes">a byte array</param> /// <returns></returns> public static Blob CreateBlob(byte[] bytes) { return new BlobImpl(bytes); } /// <summary> /// Create a new Blob. The returned object will be initially immutable. /// </summary> /// <param name="stream">a binary stream</param> /// <param name="length">the number of bytes in the stream</param> /// <returns></returns> public static Blob CreateBlob(TextReader stream, int length) { return new BlobImpl(stream, length); } /// <summary> /// Create a new Blob. The returned object will be initially immutable. /// </summary> /// <param name="stream">a binary stream</param> /// <param name="length">the number of bytes in the stream</param> /// <returns></returns> public static Blob CreateBlob(BinaryReader stream, int length) { return new BlobImpl(stream, length); } /// <summary> /// Create a new Blob. The returned object will be initially immutable. /// </summary> /// <param name="stream">a binary stream</param> /// <returns></returns> public static Blob CreateBlob(StreamReader stream) { return new BlobImpl( stream, stream.available() ); } /// <summary> /// Create a new Blob. The returned object will be initially immutable. /// </summary> /// <param name="stream">a binary stream</param> /// <returns></returns> public static Blob CreateBlob(BinaryReader stream) { return new BlobImpl( stream, stream.available() ); } /// <summary> /// Create a new Clob. The returned object will be /// initially immutable. /// </summary> /// <param name="str">a String</param> /// <returns></returns> public static Clob CreateClob(string str) { return new ClobImpl(str); } /// <summary> /// Create a new Clob. The returned object will be initially immutable. /// </summary> /// <param name="reader">a character stream</param> /// <param name="length">the number of characters in the stream</param> /// <returns></returns> public static Clob CreateClob(TextReader reader, int length) { return new ClobImpl(reader, length); } */ } } --- NHibernate.cs DELETED --- |
From: Michael D. <mik...@us...> - 2005-01-17 03:41:43
|
Update of /cvsroot/nhibernate/nhibernate/src/NHibernate/Cfg In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv11286/NHibernate/Cfg Modified Files: Binder.cs Log Message: Renamed NHibernate.NHibernate to NHibernate.NHibernateUtil. Index: Binder.cs =================================================================== RCS file: /cvsroot/nhibernate/nhibernate/src/NHibernate/Cfg/Binder.cs,v retrieving revision 1.36 retrieving revision 1.37 diff -C2 -d -r1.36 -r1.37 *** Binder.cs 3 Jan 2005 03:46:47 -0000 1.36 --- Binder.cs 17 Jan 2005 03:40:54 -0000 1.37 *************** *** 250,254 **** Value val = new Value(table); BindValue(subnode, val, false, propertyName); ! if ( val.Type==null ) val.Type = ( ("version".Equals(name)) ? NHibernate.Int32 : NHibernate.Timestamp ); Mapping.Property timestampProp = new Mapping.Property(val); BindProperty(subnode, timestampProp, mappings); --- 250,254 ---- Value val = new Value(table); BindValue(subnode, val, false, propertyName); ! if ( val.Type==null ) val.Type = ( ("version".Equals(name)) ? NHibernateUtil.Int32 : NHibernateUtil.Timestamp ); Mapping.Property timestampProp = new Mapping.Property(val); BindProperty(subnode, timestampProp, mappings); *************** *** 263,270 **** if ( discrim.Type==null ) { ! discrim.Type = NHibernate.String; foreach(Column col in discrim.ColumnCollection) { ! col.Type = NHibernate.String; } } --- 263,270 ---- if ( discrim.Type==null ) { ! discrim.Type = NHibernateUtil.String; foreach(Column col in discrim.ColumnCollection) { ! col.Type = NHibernateUtil.String; } } *************** *** 535,539 **** foreach(Column col in model.ColumnCollection) { ! col.Type = NHibernate.Int32; col.TypeIndex = 0; break; --- 535,539 ---- foreach(Column col in model.ColumnCollection) { ! col.Type = NHibernateUtil.Int32; col.TypeIndex = 0; break; *************** *** 609,613 **** try { ! model.Type = (EntityType) NHibernate.Entity( ReflectHelper.ClassForName( node.Attributes["class"].Value) ); } --- 609,613 ---- try { ! model.Type = (EntityType) NHibernateUtil.Entity( ReflectHelper.ClassForName( node.Attributes["class"].Value) ); } |
From: Michael D. <mik...@us...> - 2005-01-17 03:41:35
|
Update of /cvsroot/nhibernate/nhibernate/src/NHibernate/Dialect In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv11286/NHibernate/Dialect Modified Files: Dialect.cs Oracle9Dialect.cs Log Message: Renamed NHibernate.NHibernate to NHibernate.NHibernateUtil. Index: Oracle9Dialect.cs =================================================================== RCS file: /cvsroot/nhibernate/nhibernate/src/NHibernate/Dialect/Oracle9Dialect.cs,v retrieving revision 1.16 retrieving revision 1.17 diff -C2 -d -r1.16 -r1.17 *** Oracle9Dialect.cs 31 Dec 2004 17:07:24 -0000 1.16 --- Oracle9Dialect.cs 17 Jan 2005 03:40:56 -0000 1.17 *************** *** 62,69 **** aggregateFunctions[ "trunc" ] = new QueryFunctionStandard(); aggregateFunctions[ "round" ] = new QueryFunctionStandard(); ! aggregateFunctions[ "abs" ] = new QueryFunctionStandard( NHibernate.Int32 ); ! aggregateFunctions[ "sign" ] = new QueryFunctionStandard( NHibernate.Int32 ); ! aggregateFunctions[ "ceil" ] = new QueryFunctionStandard( NHibernate.Int32 ); ! aggregateFunctions[ "floor" ] = new QueryFunctionStandard( NHibernate.Int32 ); aggregateFunctions[ "sqrt" ] = new QueryFunctionStandard(); aggregateFunctions[ "exp" ] = new QueryFunctionStandard(); --- 62,69 ---- aggregateFunctions[ "trunc" ] = new QueryFunctionStandard(); aggregateFunctions[ "round" ] = new QueryFunctionStandard(); ! aggregateFunctions[ "abs" ] = new QueryFunctionStandard( NHibernateUtil.Int32 ); ! aggregateFunctions[ "sign" ] = new QueryFunctionStandard( NHibernateUtil.Int32 ); ! aggregateFunctions[ "ceil" ] = new QueryFunctionStandard( NHibernateUtil.Int32 ); ! aggregateFunctions[ "floor" ] = new QueryFunctionStandard( NHibernateUtil.Int32 ); aggregateFunctions[ "sqrt" ] = new QueryFunctionStandard(); aggregateFunctions[ "exp" ] = new QueryFunctionStandard(); *************** *** 78,82 **** aggregateFunctions[ "variance" ] = new QueryFunctionStandard(); aggregateFunctions[ "sysdate" ] = new SysdateQueryFunctionInfo(); ! aggregateFunctions[ "lastday" ] = new QueryFunctionStandard( NHibernate.Date ); } --- 78,82 ---- aggregateFunctions[ "variance" ] = new QueryFunctionStandard(); aggregateFunctions[ "sysdate" ] = new SysdateQueryFunctionInfo(); ! aggregateFunctions[ "lastday" ] = new QueryFunctionStandard( NHibernateUtil.Date ); } *************** *** 198,202 **** public IType QueryFunctionType( IType columnType, IMapping mapping ) { ! return NHibernate.Date; } --- 198,202 ---- public IType QueryFunctionType( IType columnType, IMapping mapping ) { ! return NHibernateUtil.Date; } Index: Dialect.cs =================================================================== RCS file: /cvsroot/nhibernate/nhibernate/src/NHibernate/Dialect/Dialect.cs,v retrieving revision 1.41 retrieving revision 1.42 diff -C2 -d -r1.41 -r1.42 *** Dialect.cs 31 Dec 2004 17:07:22 -0000 1.41 --- Dialect.cs 17 Jan 2005 03:40:55 -0000 1.42 *************** *** 801,805 **** public IType QueryFunctionType( IType columnType, IMapping mapping ) { ! return NHibernate.Int32; } --- 801,805 ---- public IType QueryFunctionType( IType columnType, IMapping mapping ) { ! return NHibernateUtil.Int32; } *************** *** 851,855 **** if( sqlType.DbType == DbType.Int16 || sqlType.DbType == DbType.Int32 || sqlType.DbType == DbType.Int64 ) { ! return NHibernate.Single; } else --- 851,855 ---- if( sqlType.DbType == DbType.Int16 || sqlType.DbType == DbType.Int32 || sqlType.DbType == DbType.Int64 ) { ! return NHibernateUtil.Single; } else |