-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 2 posts ] 
Author Message
 Post subject: Session.Delete() with transient instance FK error
PostPosted: Wed Feb 01, 2006 3:59 pm 
Newbie

Joined: Wed Feb 01, 2006 3:30 pm
Posts: 7
Hi,

I am having trouble using the Session.Delete(Object) method when I pass in a transient object with the Identifier set. It works fine when I dont use a transient instance. It looks like it doesn't delete some of the collections mapped as one-to-many, thus causing a FK constraint error when it tries to delete the entity.

Hibernate version:

NHibernate 1.0.2.0

Mapping documents:

CensusEntity object

Code:
<?xml version="1.0" encoding="utf-8" ?>
<hibernate-mapping xmlns="urn:nhibernate-mapping-2.0">
  <class name="Com.Klinitek.Census.Model.CensusEntity, Com.Klinitek.Census" table="Census">
    <id name="Id" column="id_census" type="System.Int32">
      <generator class="identity" />
    </id>

    <property name="Type" column="census_type" type="System.String" not-null="true"/>
    <property name="Name" column="name" type="System.String" not-null="true"/>
    <property name="Description" column="description" type="System.String" not-null="false"/>
    <property name="DefaultSortColumn" column="default_sort_column" type="System.String" not-null="true"/>
    <property name="DateCreated" column="date_created" type="System.DateTime" not-null="true"/>
    <property name="DateLastModified" column="last_modified" type="System.DateTime" not-null="true"/>

    <set name="PhysicianGroups" cascade="all-delete-orphan" lazy="true" table="CensusPhysicianGroup">
      <key column="id_census"/>
      <element column="id_party" type="System.Int32"/>
    </set>

    <set name="Physicians" cascade="all-delete-orphan" lazy="true" table="CensusPhysician" >
      <key column="id_census"/>
      <element column="id_person" type="System.Int32"/>
    </set>

    <set name="Patients" cascade="all-delete-orphan" lazy="true" table="CensusPatient" >
      <key column="id_census"/>
      <element column="id_patient" type="System.Int32"/>
    </set>

    <set name="POCs" cascade="all-delete-orphan" lazy="true" table="CensusPOC" >
      <key column="id_census"/>
      <element column="point_of_care" type="System.String"/>
    </set>

    <set name="PartyAccess" cascade="all-delete-orphan" inverse="true" lazy="true">
      <key column="id_census"/>
      <one-to-many class="Com.Klinitek.Census.Model.CensusPartyAccess, Com.Klinitek.Census"/>
    </set>

    <set name="UserAccess" cascade="all-delete-orphan" inverse="true" lazy="true">
      <key column="id_census"/>
      <one-to-many class="Com.Klinitek.Census.Model.CensusUserAccess, Com.Klinitek.Census"/>
    </set>

    <set name="CensusAlerts" cascade="all-delete-orphan" inverse="true" lazy="true">
      <key column="id_census"/>
      <one-to-many class="Com.Klinitek.Census.Model.CensusAlert, Com.Klinitek.Census"/>
    </set>

    <set name="Entries" cascade="all-delete-orphan" lazy="true" inverse="true">
      <key column="id_census"/>
      <one-to-many class="Com.Klinitek.Census.Model.CensusEntry, Com.Klinitek.Census"/>
    </set>

  </class>
</hibernate-mapping>


CensusAlert object

Code:
<?xml version="1.0" encoding="utf-8" ?>
<hibernate-mapping xmlns="urn:nhibernate-mapping-2.0">
  <class name="Com.Klinitek.Census.Model.CensusAlert, Com.Klinitek.Census" table="CensusAlert">
    <id name="Id" column="id_census_alert" type="System.Int32">
      <generator class="identity"/>
    </id>

    <many-to-one name="CensusEntity" column="id_census"
                 class="Com.Klinitek.Census.Model.CensusEntity, Com.Klinitek.Census" not-null="true" cascade="none"/>
    <property name="Patient" column="id_patient" type="System.Int32"/>
    <property name="User" column="id_user" type="System.Int32"/>
    <property name="Type" column="alert_type" type="System.String" not-null="true"/>
  </class>
</hibernate-mapping>



Code between sessionFactory.openSession() and session.close():

NUnit test case.

Code:
        private static readonly ICensusDAO dao = ContextRegistry.GetContext().GetObject("CensusDAO") as ICensusDAO;

        [Test]
        public void DeleteTest()
        {

            CensusEntity c = new CensusEntity();
            c.Id = 207;

            dao.Delete(c);

            NHibernateHttpModule.CurrentSession.Flush();

        }


CensusDAO delete method.

Code:
        public void Delete(CensusEntity censusEntity)
        {
            if (logger.IsDebugEnabled)
                logger.Debug("Delete: " + censusEntity.ToString());

            session.Delete(censusEntity);
        }


Full stack trace of any exception that occurs:

Code:
NHibernate.ADOException: could not delete: [Com.Klinitek.Census.Model.CensusEntity#207] ---> System.Data.SqlClient.SqlException: The DELETE statement conflicted with the REFERENCE constraint "Census_CensusAlert_FK1". The conflict occurred in database "Census", table "dbo.CensusAlert", column 'id_census'.
The statement has been terminated.
   at System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection)
   at System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection)
   at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj)
   at System.Data.SqlClient.TdsParser.Run(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj)
   at System.Data.SqlClient.SqlCommand.FinishExecuteReader(SqlDataReader ds, RunBehavior runBehavior, String resetOptionsString)
   at System.Data.SqlClient.SqlCommand.RunExecuteReaderTds(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, Boolean async)
   at System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method, DbAsyncResult result)
   at System.Data.SqlClient.SqlCommand.InternalExecuteNonQuery(DbAsyncResult result, String methodName, Boolean sendToPipe)
   at System.Data.SqlClient.SqlCommand.ExecuteNonQuery()
   at NHibernate.Impl.BatcherImpl.ExecuteNonQuery(IDbCommand cmd)
   at NHibernate.Impl.NonBatchingBatcher.AddToBatch(Int32 expectedRowCount)
   at NHibernate.Persister.EntityPersister.Delete(Object id, Object version, Object obj, ISessionImplementor session)
   --- End of inner exception stack trace ---
   at NHibernate.Persister.EntityPersister.Delete(Object id, Object version, Object obj, ISessionImplementor session)
   at NHibernate.Impl.ScheduledDeletion.Execute()
   at NHibernate.Impl.SessionImpl.Execute(IExecutable executable)
   at NHibernate.Impl.SessionImpl.ExecuteAll(IList list)
   at NHibernate.Impl.SessionImpl.Execute()



Name and version of the database you are using:

Sql Server 2005

The generated SQL (show_sql=true):

You can see it from the hibernate log excerpt below.


Debug level Hibernate log excerpt:

Besides the delete error there is also a strange error:
NHibernate.Persister.GetSetHelperFactory - Compiled with error: Unexpected character '`'


[code]
***** Com.Klinitek.Census.Test.DataAccess.Impl.NHibernateCensusDAOTest.DeleteTest
2006-02-01 11:45:46,656 DEBUG Com.Klinitek.Census.DataAccess.Impl.NHibernateCensusDAO - Delete: CensusEntity [Id: 207] [Name: (null)]
2006-02-01 11:45:46,671 INFO NHibernate.Cfg.Environment - NHibernate 1.0.2
2006-02-01 11:45:46,671 INFO NHibernate.Cfg.Environment - nhibernate section not found in application configuration file
2006-02-01 11:45:46,671 INFO NHibernate.Cfg.Environment - Using reflection optimizer
2006-02-01 11:45:46,734 DEBUG NHibernate.Cfg.Configuration - connection.provider=NHibernate.Connection.DriverConnectionProvider
2006-02-01 11:45:46,734 DEBUG NHibernate.Cfg.Configuration - connection.driver_class=NHibernate.Driver.SqlClientDriver
2006-02-01 11:45:46,734 DEBUG NHibernate.Cfg.Configuration - connection.connection_string=Server=(local);Database=Census;Trusted_Connection=True;Connection Timeout=15;
2006-02-01 11:45:46,734 DEBUG NHibernate.Cfg.Configuration - show_sql=true
2006-02-01 11:45:46,734 DEBUG NHibernate.Cfg.Configuration - dialect=NHibernate.Dialect.MsSql2000Dialect
2006-02-01 11:45:46,734 DEBUG NHibernate.Cfg.Configuration - use_outer_join=true
2006-02-01 11:45:46,734 DEBUG NHibernate.Cfg.Configuration - <-Com.Klinitek.Census
2006-02-01 11:45:46,734 INFO NHibernate.Cfg.Configuration - Searching for mapped documents in assembly: Com.Klinitek.Census
2006-02-01 11:45:46,734 INFO NHibernate.Cfg.Configuration - Found mapping documents in assembly: Com.Klinitek.Census.Model.CensusSort.hbm.xml
2006-02-01 11:45:46,765 INFO NHibernate.Dialect.Dialect - Using dialect: NHibernate.Dialect.MsSql2000Dialect
2006-02-01 11:45:46,796 INFO NHibernate.Cfg.Binder - Mapping class: Com.Klinitek.Census.Model.CensusSort -> CensusSort
2006-02-01 11:45:46,843 DEBUG NHibernate.Cfg.Binder - Mapped property: Id -> id_census_sort, type: Int32
2006-02-01 11:45:46,859 DEBUG NHibernate.Cfg.Binder - Mapped property: CensusEntity -> id_census, type: CensusEntity
2006-02-01 11:45:46,859 DEBUG NHibernate.Cfg.Binder - Mapped property: User -> id_user, type: Int32
2006-02-01 11:45:46,859 DEBUG NHibernate.Cfg.Binder - Mapped property: Name -> name, type: String
2006-02-01 11:45:46,859 DEBUG NHibernate.Cfg.Binder - Mapped property: Description -> description, type: String
2006-02-01 11:45:46,937 DEBUG NHibernate.Cfg.Binder - Mapped property: SortEntries, type: ISet
2006-02-01 11:45:46,937 INFO NHibernate.Cfg.Configuration - Found mapping documents in assembly: Com.Klinitek.Census.Model.Location.hbm.xml
2006-02-01 11:45:46,937 INFO NHibernate.Dialect.Dialect - Using dialect: NHibernate.Dialect.MsSql2000Dialect
2006-02-01 11:45:46,937 INFO NHibernate.Cfg.Binder - Mapping class: Com.Klinitek.Census.Model.Location -> Location
2006-02-01 11:45:46,937 DEBUG NHibernate.Cfg.Binder - Mapped property: Id -> id_location, type: Int32
2006-02-01 11:45:46,937 DEBUG NHibernate.Cfg.Binder - Mapped property: PointOfCare -> point_of_care, type: String
2006-02-01 11:45:46,953 DEBUG NHibernate.Cfg.Binder - Mapped property: Room -> room, type: String
2006-02-01 11:45:46,953 DEBUG NHibernate.Cfg.Binder - Mapped property: Bed -> bed, type: String
2006-02-01 11:45:46,953 DEBUG NHibernate.Cfg.Binder - Mapped property: Description -> description, type: String
2006-02-01 11:45:46,953 DEBUG NHibernate.Cfg.Binder - Mapped property: Type -> location_type, type: String
2006-02-01 11:45:46,953 DEBUG NHibernate.Cfg.Binder - Mapped property: Status -> location_status, type: String
2006-02-01 11:45:46,953 DEBUG NHibernate.Cfg.Binder - Mapped property: IsSwing -> swing_bed, type: Boolean
2006-02-01 11:45:46,968 DEBUG NHibernate.Cfg.Binder - Mapped property: DateCreated -> date_created, type: DateTime
2006-02-01 11:45:46,968 DEBUG NHibernate.Cfg.Binder - Mapped property: DateLastModified -> last_modified, type: DateTime
2006-02-01 11:45:46,968 INFO NHibernate.Cfg.Configuration - Found mapping documents in assembly: Com.Klinitek.Census.Model.CensusEntity.hbm.xml
2006-02-01 11:45:46,968 INFO NHibernate.Dialect.Dialect - Using dialect: NHibernate.Dialect.MsSql2000Dialect
2006-02-01 11:45:46,968 INFO NHibernate.Cfg.Binder - Mapping class: Com.Klinitek.Census.Model.CensusEntity -> Census
2006-02-01 11:45:46,968 DEBUG NHibernate.Cfg.Binder - Mapped property: Id -> id_census, type: Int32
2006-02-01 11:45:46,968 DEBUG NHibernate.Cfg.Binder - Mapped property: Type -> census_type, type: String
2006-02-01 11:45:46,968 DEBUG NHibernate.Cfg.Binder - Mapped property: Name -> name, type: String
2006-02-01 11:45:46,968 DEBUG NHibernate.Cfg.Binder - Mapped property: Description -> description, type: String
2006-02-01 11:45:46,984 DEBUG NHibernate.Cfg.Binder - Mapped property: DefaultSortColumn -> default_sort_column, type: String
2006-02-01 11:45:46,984 DEBUG NHibernate.Cfg.Binder - Mapped property: DateCreated -> date_created, type: DateTime
2006-02-01 11:45:46,984 DEBUG NHibernate.Cfg.Binder - Mapped property: DateLastModified -> last_modified, type: DateTime
2006-02-01 11:45:46,984 INFO NHibernate.Cfg.Binder - Mapping collection: Com.Klinitek.Census.Model.CensusEntity.PhysicianGroups -> CensusPhysicianGroup
2006-02-01 11:45:46,984 DEBUG NHibernate.Cfg.Binder - Mapped property: PhysicianGroups, type: ISet
2006-02-01 11:45:47,000 INFO NHibernate.Cfg.Binder - Mapping collection: Com.Klinitek.Census.Model.CensusEntity.Physicians -> CensusPhysician
2006-02-01 11:45:47,000 DEBUG NHibernate.Cfg.Binder - Mapped property: Physicians, type: ISet
2006-02-01 11:45:47,000 INFO NHibernate.Cfg.Binder - Mapping collection: Com.Klinitek.Census.Model.CensusEntity.Patients -> CensusPatient
2006-02-01 11:45:47,000 DEBUG NHibernate.Cfg.Binder - Mapped property: Patients, type: ISet
2006-02-01 11:45:47,000 INFO NHibernate.Cfg.Binder - Mapping collection: Com.Klinitek.Census.Model.CensusEntity.POCs -> CensusPOC
2006-02-01 11:45:47,000 DEBUG NHibernate.Cfg.Binder - Mapped property: POCs, type: ISet
2006-02-01 11:45:47,000 DEBUG NHibernate.Cfg.Binder - Mapped property: PartyAccess, type: ISet
2006-02-01 11:45:47,000 DEBUG NHibernate.Cfg.Binder - Mapped property: UserAccess, type: ISet
2006-02-01 11:45:47,000 DEBUG NHibernate.Cfg.Binder - Mapped property: CensusAlerts, type: ISet
2006-02-01 11:45:47,000 DEBUG NHibernate.Cfg.Binder - Mapped property: Entries, type: ISet
2006-02-01 11:45:47,000 INFO NHibernate.Cfg.Configuration - Found mapping documents in assembly: Com.Klinitek.Census.Model.CensusEntry.hbm.xml
2006-02-01 11:45:47,000 INFO NHibernate.Dialect.Dialect - Using dialect: NHibernate.Dialect.MsSql2000Dialect
2006-02-01 11:45:47,000 INFO NHibernate.Cfg.Binder - Mapping class: Com.Klinitek.Census.Model.CensusEntry -> CensusEntry
2006-02-01 11:45:47,000 DEBUG NHibernate.Cfg.Binder - Mapped property: Id -> id_census_entry, type: Int32
2006-02-01 11:45:47,000 DEBUG NHibernate.Cfg.Binder - Mapped property: CensusEntity -> id_census, type: CensusEntity
2006-02-01 11:45:47,000 DEBUG NHibernate.Cfg.Binder - Mapped property: Encounter -> id_encounter, type: Int32
2006-02-01 11:45:47,000 DEBUG NHibernate.Cfg.Binder - Mapped property: PointOfCare -> point_of_care, type: String
2006-02-01 11:45:47,000 DEBUG NHibernate.Cfg.Binder - Mapped property: Room -> room, type: String
2006-02-01 11:45:47,000 DEBUG NHibernate.Cfg.Binder - Mapped property: Bed -> bed, type: String
2006-02-01 11:45:47,000 DEBUG NHibernate.Cfg.Binder - Mapped property: State -> entry_state, type: String
2006-02-01 11:45:47,000 INFO NHibernate.Cfg.Configuration - Found mapping documents in assembly: Com.Klinitek.Census.Model.CensusAlert.hbm.xml
2006-02-01 11:45:47,000 INFO NHibernate.Dialect.Dialect - Using dialect: NHibernate.Dialect.MsSql2000Dialect
2006-02-01 11:45:47,000 INFO NHibernate.Cfg.Binder - Mapping class: Com.Klinitek.Census.Model.CensusAlert -> CensusAlert
2006-02-01 11:45:47,000 DEBUG NHibernate.Cfg.Binder - Mapped property: Id -> id_census_alert, type: Int32
2006-02-01 11:45:47,000 DEBUG NHibernate.Cfg.Binder - Mapped property: CensusEntity -> id_census, type: CensusEntity
2006-02-01 11:45:47,000 DEBUG NHibernate.Cfg.Binder - Mapped property: Patient -> id_patient, type: Int32
2006-02-01 11:45:47,000 DEBUG NHibernate.Cfg.Binder - Mapped property: User -> id_user, type: Int32
2006-02-01 11:45:47,000 DEBUG NHibernate.Cfg.Binder - Mapped property: Type -> alert_type, type: String
2006-02-01 11:45:47,000 INFO NHibernate.Cfg.Configuration - Found mapping documents in assembly: Com.Klinitek.Census.Model.CensusUserAccess.hbm.xml
2006-02-01 11:45:47,000 INFO NHibernate.Dialect.Dialect - Using dialect: NHibernate.Dialect.MsSql2000Dialect
2006-02-01 11:45:47,000 INFO NHibernate.Cfg.Binder - Mapping class: Com.Klinitek.Census.Model.CensusUserAccess -> CensusUserAccess
2006-02-01 11:45:47,000 DEBUG NHibernate.Cfg.Binder - Mapped property: CensusEntity -> id_census, type: CensusEntity
2006-02-01 11:45:47,000 DEBUG NHibernate.Cfg.Binder - Mapped property: User -> id_user, type: Int32
2006-02-01 11:45:47,031 DEBUG NHibernate.Persister.GetSetHelperFactory - Init compiler for class Com.Klinitek.Census.Model.CensusUserAccess
2006-02-01 11:45:47,031 DEBUG NHibernate.Persister.GetSetHelperFactory - Adding referenced assembly C:\Documents and Settings\Kevin Chan\Local Settings\Temp\nunit20\ShadowCopyCache\632743911444531250\Tests\assembly\dl3\762a4853\0091880d_1f1ac601\NHibernate.DLL
2006-02-01 11:45:47,031 DEBUG NHibernate.Persister.GetSetHelperFactory - Adding referenced assembly C:\Documents and Settings\Kevin Chan\Local Settings\Temp\nunit20\ShadowCopyCache\632743911444531250\Tests\assembly\dl3\9238375d\822a9f7b_6727c601\Com.Klinitek.Census.DLL
2006-02-01 11:45:47,031 DEBUG NHibernate.Persister.GetSetHelperFactory - Adding referenced assembly C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\mscorlib.dll
2006-02-01 11:45:47,031 DEBUG NHibernate.Persister.GetSetHelperFactory - Adding referenced assembly C:\WINDOWS\assembly\GAC_32\System.Web\2.0.0.0__b03f5f7f11d50a3a\System.Web.dll
2006-02-01 11:45:47,031 DEBUG NHibernate.Persister.GetSetHelperFactory - Adding referenced assembly C:\Documents and Settings\Kevin Chan\Local Settings\Temp\nunit20\ShadowCopyCache\632743911444531250\Tests\assembly\dl3\b92ba56d\8cd52c3b_8a20c601\Com.Klinitek.Logging.DLL
2006-02-01 11:45:47,031 DEBUG NHibernate.Persister.GetSetHelperFactory - Adding referenced assembly C:\Documents and Settings\Kevin Chan\Local Settings\Temp\nunit20\ShadowCopyCache\632743911444531250\Tests\assembly\dl3\28112091\00ce1670_1f1ec601\Iesi.Collections.DLL
2006-02-01 11:45:47,031 DEBUG NHibernate.Persister.GetSetHelperFactory - Adding referenced assembly C:\WINDOWS\assembly\GAC_32\System.Data\2.0.0.0__b77a5c561934e089\System.Data.dll
2006-02-01 11:45:47,250 DEBUG NHibernate.Persister.GetSetHelperFactory - Compiled with error:
using System;
using NHibernate.Property;
namespace NHibernate.Persister {
public class GetSetHelper_Com_Klinitek_Census_Model_CensusUserAccess : IGetSetHelper {
ISetter[] setters;
IGetter[] getters;
public GetSetHelper_Com_Klinitek_Census_Model_CensusUserAccess(ISetter[] setters, IGetter[] getters) {
this.setters = setters;
this.getters = getters;
}
public void SetPropertyValues(object obj, object[] values) {
Com.Klinitek.Census.Model.CensusUserAccess t = (Com.Klinitek.Census.Model.CensusUserAccess)obj;
try
{
t.CensusEntity = (Com.Klinitek.Census.Model.CensusEntity)values[0];
t.User = values[1] == null ? new System.Nullable`1[[System.Int32, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]]() : (System.Nullable`1[[System.Int32, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]])values[1];
}
catch( InvalidCastException ice )
{
throw new MappingException(
"Invalid mapping information specified for type " + obj.GetType() + ", check your mapping file for property type mismatches",
ice);
}
}
public object[] GetPropertyValues(object obj) {
Com.Klinitek.Census.Model.CensusUserAccess t = (Com.Klinitek.Census.Model.CensusUserAccess)obj;
object[] ret = new object[2];
ret[0] = t.CensusEntity;
ret[1] = t.User;
return ret;
}
}
}

2006-02-01 11:45:47,250 DEBUG NHibernate.Persister.GetSetHelperFactory - Line:16, Column:51 Message:Unexpected character '`'
2006-02-01 11:45:47,250 DEBUG NHibernate.Persister.GetSetHelperFactory - Line:16, Column:167 Message:Unexpected character '`'
2006-02-01 11:45:47,265 INFO NHibernate.Persister.GetSetHelperFactory - Disabling reflection optimizer for class Com.Klinitek.Census.Model.CensusUserAccess
2006-02-01 11:45:47,265 DEBUG NHibernate.Persister.GetSetHelperFactory - CodeDOM compilation failed
System.InvalidOperationException: Unexpected character '`'
at NHibernate.Persister.GetSetHelperFactory.Build(String code)
at NHibernate.Persister.GetSetHelperFactory.CreateGetSetHelper()
2006-02-01 11:45:47,265 DEBUG NHibernate.Cfg.Binder - Mapped property: DateStart -> date_start, type: DateTime
2006-02-01 11:45:47,281 DEBUG NHibernate.Cfg.Binder - Mapped property: DateEnd -> date_end, type: DateTime
2006-02-01 11:45:47,281 INFO NHibernate.Cfg.Configuration - Found mapping documents in assembly: Com.Klinitek.Census.Model.CensusHx.hbm.xml
2006-02-01 11:45:47,281 INFO NHibernate.Dialect.Dialect - Using dialect: NHibernate.Dialect.MsSql2000Dialect
2006-02-01 11:45:47,281 INFO NHibernate.Cfg.Binder - Mapping class: Com.Klinitek.Census.Model.CensusHx -> CensusHx
2006-02-01 11:45:47,281 DEBUG NHibernate.Cfg.Binder - Mapped property: Id -> id_census_hx, type: Int32
2006-02-01 11:45:47,281 DEBUG NHibernate.Cfg.Binder - Mapped property: Encounter -> id_encounter, type: Int32
2006-02-01 11:45:47,281 DEBUG NHibernate.Cfg.Binder - Mapped property: PointOfCare -> point_of_care, type: String
2006-02-01 11:45:47,281 DEBUG NHibernate.Cfg.Binder - Mapped property: Room -> room, type: String
2006-02-01 11:45:47,281 DEBUG NHibernate.Cfg.Binder - Mapped property: Bed -> bed, type: String
2006-02-01 11:45:47,281 DEBUG NHibernate.Cfg.Binder - Mapped property: State -> entry_state, type: String
2006-02-01 11:45:47,281 DEBUG NHibernate.Cfg.Binder - Mapped property: DateCreated -> date_created, type: DateTime
2006-02-01 11:45:47,281 INFO NHibernate.Cfg.Configuration - Found mapping documents in assembly: Com.Klinitek.Census.Model.CensusSortEntry.hbm.xml
2006-02-01 11:45:47,281 INFO NHibernate.Dialect.Dialect - Using dialect: NHibernate.Dialect.MsSql2000Dialect
2006-02-01 11:45:47,296 INFO NHibernate.Cfg.Binder - Mapping class: Com.Klinitek.Census.Model.CensusSortEntry -> CensusSortEntry
2006-02-01 11:45:47,296 DEBUG NHibernate.Cfg.Binder - Mapped property: CensusSort -> id_census_sort, type: CensusSort
2006-02-01 11:45:47,296 DEBUG NHibernate.Cfg.Binder - Mapped property: CensusEntry -> id_census_entry, type: CensusEntry
2006-02-01 11:45:47,296 DEBUG NHibernate.Persister.GetSetHelperFactory - Init compiler for class Com.Klinitek.Census.Model.CensusSortEntry
2006-02-01 11:45:47,296 DEBUG NHibernate.Persister.GetSetHelperFactory - Adding referenced assembly C:\Documents and Settings\Kevin Chan\Local Settings\Temp\nunit20\ShadowCopyCache\632743911444531250\Tests\assembly\dl3\762a4853\0091880d_1f1ac601\NHibernate.DLL
2006-02-01 11:45:47,296 DEBUG NHibernate.Persister.GetSetHelperFactory - Adding referenced assembly C:\Documents and Settings\Kevin Chan\Local Settings\Temp\nunit20\ShadowCopyCache\632743911444531250\Tests\assembly\dl3\9238375d\822a9f7b_6727c601\Com.Klinitek.Census.DLL
2006-02-01 11:45:47,312 DEBUG NHibernate.Persister.GetSetHelperFactory - Adding referenced assembly C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\mscorlib.dll
2006-02-01 11:45:47,312 DEBUG NHibernate.Persister.GetSetHelperFactory - Adding referenced assembly C:\WINDOWS\assembly\GAC_32\System.Web\2.0.0.0__b03f5f7f11d50a3a\System.Web.dll
2006-02-01 11:45:47,312 DEBUG NHibernate.Persister.GetSetHelperFactory - Adding referenced assembly C:\Documents and Settings\Kevin Chan\Local Settings\Temp\nunit20\ShadowCopyCache\632743911444531250\Tests\assembly\dl3\b92ba56d\8cd52c3b_8a20c601\Com.Klinitek.Logging.DLL
2006-02-01 11:45:47,312 DEBUG NHibernate.Persister.GetSetHelperFactory - Adding referenced assembly C:\Documents and Settings\Kevin Chan\Local Settings\Temp\nunit20\ShadowCopyCache\632743911444531250\Tests\assembly\dl3\28112091\00ce1670_1f1ec601\Iesi.Collections.DLL
2006-02-01 11:45:47,312 DEBUG NHibernate.Persister.GetSetHelperFactory - Adding referenced assembly C:\WINDOWS\assembly\GAC_32\System.Data\2.0.0.0__b77a5c561934e089\System.Data.dll
2006-02-01 11:45:47,453 DEBUG NHibernate.Persister.GetSetHelperFactory - Compiled ok:
using System;
using NHibernate.Property;
namespace NHibernate.Persister {
public class GetSetHelper_Com_Klinitek_Census_Model_CensusSortEntry : IGetSetHelper {
ISetter[] setters;
IGetter[] getters;
public GetSetHelper_Com_Klinitek_Census_Model_CensusSortEntry(ISetter[] setters, IGetter[] getters) {
this.setters = setters;
this.getters = getters;
}
public void SetPropertyValues(object obj, object[] values) {
Com.Klinitek.Census.Model.CensusSortEntry t = (Com.Klinitek.Census.Model.CensusSortEntry)obj;
try
{
t.CensusSort = (Com.Klinitek.Census.Model.CensusSort)values[0];
t.CensusEntry = (Com.Klinitek.Census.Model.CensusEntry)values[1];
}
catch( InvalidCastException ice )
{
throw new MappingException(
"Invalid mapping information specified for type " + obj.GetType() + ", check your mapping file for property type mismatches",
ice);
}
}
public object[] GetPropertyValues(object obj) {
Com.Klinitek.Census.Model.CensusSortEntry t = (Com.Klinitek.Census.Model.CensusSortEntry)obj;
object[] ret = new object[2];
ret[0] = t.CensusSort;
ret[1] = t.CensusEntry;
return ret;
}
}
}

2006-02-01 11:45:47,453 DEBUG NHibernate.Cfg.Binder - Mapped property: SortOrder -> sort_order, type: Int32
2006-02-01 11:45:47,453 INFO NHibernate.Cfg.Configuration - Found mapping documents in assembly: Com.Klinitek.Census.Model.CensusPartyAccess.hbm.xml
2006-02-01 11:45:47,453 INFO NHibernate.Dialect.Dialect - Using dialect: NHibernate.Dialect.MsSql2000Dialect
2006-02-01 11:45:47,453 INFO NHibernate.Cfg.Binder - Mapping class: Com.Klinitek.Census.Model.CensusPartyAccess -> CensusPartyAccess
2006-02-01 11:45:47,453 DEBUG NHibernate.Cfg.Binder - Mapped property: CensusEntity -> id_census, type: CensusEntity
2006-02-01 11:45:47,453 DEBUG NHibernate.Cfg.Binder - Mapped property: Party -> id_party, type: Int32
2006-02-01 11:45:47,453 DEBUG NHibernate.Persister.GetSetHelperFactory - Init compiler for class Com.Klinitek.Census.Model.CensusPartyAccess
2006-02-01 11:45:47,453 DEBUG NHibernate.Persister.GetSetHelperFactory - Adding referenced assembly C:\Documents and Settings\Kevin Chan\Local Settings\Temp\nunit20\ShadowCopyCache\632743911444531250\Tests\assembly\dl3\762a4853\0091880d_1f1ac601\NHibernate.DLL
2006-02-01 11:45:47,453 DEBUG NHibernate.Persister.GetSetHelperFactory - Adding referenced assembly C:\Documents and Settings\Kevin Chan\Local Settings\Temp\nunit20\ShadowCopyCache\632743911444531250\Tests\assembly\dl3\9238375d\822a9f7b_6727c601\Com.Klinitek.Census.DLL
2006-02-01 11:45:47,468 DEBUG NHibernate.Persister.GetSetHelperFactory - Adding referenced assembly C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\mscorlib.dll
2006-02-01 11:45:47,468 DEBUG NHibernate.Persister.GetSetHelperFactory - Adding referenced assembly C:\WINDOWS\assembly\GAC_32\System.Web\2.0.0.0__b03f5f7f11d50a3a\System.Web.dll
2006-02-01 11:45:47,468 DEBUG NHibernate.Persister.GetSetHelperFactory - Adding referenced assembly C:\Documents and Settings\Kevin Chan\Local Settings\Temp\nunit20\ShadowCopyCache\632743911444531250\Tests\assembly\dl3\b92ba56d\8cd52c3b_8a20c601\Com.Klinitek.Logging.DLL
2006-02-01 11:45:47,468 DEBUG NHibernate.Persister.GetSetHelperFactory - Adding referenced assembly C:\Documents and Settings\Kevin Chan\Local Settings\Temp\nunit20\ShadowCopyCache\632743911444531250\Tests\assembly\dl3\28112091\00ce1670_1f1ec601\Iesi.Collections.DLL
2006-02-01 11:45:47,468 DEBUG NHibernate.Persister.GetSetHelperFactory - Adding referenced assembly C:\WINDOWS\assembly\GAC_32\System.Data\2.0.0.0__b77a5c561934e089\System.Data.dll
2006-02-01 11:45:47,515 DEBUG NHibernate.Persister.GetSetHelperFactory - Compiled with error:
using System;
using NHibernate.Property;
namespace NHibernate.Persister {
public class GetSetHelper_Com_Klinitek_Census_Model_CensusPartyAccess : IGetSetHelper {
ISetter[] setters;
IGetter[] getters;
public GetSetHelper_Com_Klinitek_Census_Model_CensusPartyAccess(ISetter[] setters, IGetter[] getters) {
this.setters = setters;
this.getters = getters;
}
public void SetPropertyValues(object obj, object[] values) {
Com.Klinitek.Census.Model.CensusPartyAccess t = (Com.Klinitek.Census.Model.CensusPartyAccess)obj;
try
{
t.CensusEntity = (Com.Klinitek.Census.Model.CensusEntity)values[0];
t.Party = values[1] == null ? new System.Nullable`1[[System.Int32, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]]() : (System.Nullable`1[[System.Int32, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]])values[1];
}
catch( InvalidCastException ice )
{
throw new MappingException(
"Invalid mapping information specified for type " + obj.GetType() + ", check your mapping file for property type mismatches",
ice);
}
}
public object[] GetPropertyValues(object obj) {
Com.Klinitek.Census.Model.CensusPartyAccess t = (Com.Klinitek.Census.Model.CensusPartyAccess)obj;
object[] ret = new object[2];
ret[0] = t.CensusEntity;
ret[1] = t.Party;
return ret;
}
}
}

2006-02-01 11:45:47,515 DEBUG NHibernate.Persister.GetSetHelperFactory - Line:16, Column:52 Message:Unexpected character '`'
2006-02-01 11:45:47,515 DEBUG NHibernate.Persister.GetSetHelperFactory - Line:16, Column:168 Message:Unexpected character '`'
2006-02-01 11:45:47,531 INFO NHibernate.Persister.GetSetHelperFactory - Disabling reflection optimizer for class Com.Klinitek.Census.Model.CensusPartyAccess
2006-02-01 11:45:47,531 DEBUG NHibernate.Persister.GetSetHelperFactory - CodeDOM compilation failed
System.InvalidOperationException: Unexpected character '`'
at NHibernate.Persister.GetSetHelperFactory.Build(String code)
at NHibernate.Persister.GetSetHelperFactory.CreateGetSetHelper()
2006-02-01 11:45:47,531 DEBUG NHibernate.Cfg.Binder - Mapped property: DateStart -> date_start, type: DateTime
2006-02-01 11:45:47,531 DEBUG NHibernate.Cfg.Binder - Mapped property: DateEnd -> date_end, type: DateTime
2006-02-01 11:45:47,531 INFO NHibernate.Cfg.Configuration - Found mapping documents in assembly: Com.Klinitek.Census.Model.CensusUserPreferences.hbm.xml
2006-02-01 11:45:47,531 INFO NHibernate.Dialect.Dialect - Using dialect: NHibernate.Dialect.MsSql2000Dialect
2006-02-01 11:45:47,531 INFO NHibernate.Cfg.Binder - Mapping class: Com.Klinitek.Census.Model.CensusUserPreferences -> CensusUserPreferences
2006-02-01 11:45:47,531 DEBUG NHibernate.Cfg.Binder - Mapped property: CensusEntity -> id_census, type: CensusEntity
2006-02-01 11:45:47,531 DEBUG NHibernate.Cfg.Binder - Mapped property: User -> id_user, type: Int32
2006-02-01 11:45:47,531 DEBUG NHibernate.Persister.GetSetHelperFactory - Init compiler for class Com.Klinitek.Census.Model.CensusUserPreferences
2006-02-01 11:45:47,531 DEBUG NHibernate.Persister.GetSetHelperFactory - Adding referenced assembly C:\Documents and Settings\Kevin Chan\Local Settings\Temp\nunit20\ShadowCopyCache\632743911444531250\Tests\assembly\dl3\762a4853\0091880d_1f1ac601\NHibernate.DLL
2006-02-01 11:45:47,531 DEBUG NHibernate.Persister.GetSetHelperFactory - Adding referenced assembly C:\Documents and Settings\Kevin Chan\Local Settings\Temp\nunit20\ShadowCopyCache\632743911444531250\Tests\assembly\dl3\9238375d\822a9f7b_6727c601\Com.Klinitek.Census.DLL
2006-02-01 11:45:47,531 DEBUG NHibernate.Persister.GetSetHelperFactory - Adding referenced assembly C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\mscorlib.dll
2006-02-01 11:45:47,531 DEBUG NHibernate.Persister.GetSetHelperFactory - Adding referenced assembly C:\WINDOWS\assembly\GAC_32\System.Web\2.0.0.0__b03f5f7f11d50a3a\System.Web.dll
2006-02-01 11:45:47,531 DEBUG NHibernate.Persister.GetSetHelperFactory - Adding referenced assembly C:\Documents and Settings\Kevin Chan\Local Settings\Temp\nunit20\ShadowCopyCache\632743911444531250\Tests\assembly\dl3\b92ba56d\8cd52c3b_8a20c601\Com.Klinitek.Logging.DLL
2006-02-01 11:45:47,531 DEBUG NHibernate.Persister.GetSetHelperFactory - Adding referenced assembly C:\Documents and Settings\Kevin Chan\Local Settings\Temp\nunit20\ShadowCopyCache\632743911444531250\Tests\assembly\dl3\28112091\00ce1670_1f1ec601\Iesi.Collections.DLL
2006-02-01 11:45:47,531 DEBUG NHibernate.Persister.GetSetHelperFactory - Adding referenced assembly C:\WINDOWS\assembly\GAC_32\System.Data\2.0.0.0__b77a5c561934e089\System.Data.dll
2006-02-01 11:45:47,593 DEBUG NHibernate.Persister.GetSetHelperFactory - Compiled with error:
using System;
using NHibernate.Property;
namespace NHibernate.Persister {
public class GetSetHelper_Com_Klinitek_Census_Model_CensusUserPreferences : IGetSetHelper {
ISetter[] setters;
IGetter[] getters;
public GetSetHelper_Com_Klinitek_Census_Model_CensusUserPreferences(ISetter[] setters, IGetter[] getters) {
this.setters = setters;
this.getters = getters;
}
public void SetPropertyValues(object obj, object[] values) {
Com.Klinitek.Census.Model.CensusUserPreferences t = (Com.Klinitek.Census.Model.CensusUserPreferences)obj;
try
{
t.CensusEntity = (Com.Klinitek.Census.Model.CensusEntity)values[0];
t.User = values[1] == null ? new System.Nullable`1[[System.Int32, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]]() : (System.Nullable`1[[System.Int32, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]])values[1];
}
catch( InvalidCastException ice )
{
throw new MappingException(
"Invalid mapping information specified for type " + obj.GetType() + ", check your mapping file for property type mismatches",
ice);
}
}
public object[] GetPropertyValues(object obj) {
Com.Klinitek.Census.Model.CensusUserPreferences t = (Com.Klinitek.Census.Model.CensusUserPreferences)obj;
object[] ret = new object[2];
ret[0] = t.CensusEntity;
ret[1] = t.User;
return ret;
}
}
}

2006-02-01 11:45:47,609 DEBUG NHibernate.Persister.GetSetHelperFactory - Line:16, Column:51 Message:Unexpected character '`'
2006-02-01 11:45:47,609 DEBUG NHibernate.Persister.GetSetHelperFactory - Line:16, Column:167 Message:Unexpected character '`'
2006-02-01 11:45:47,609 INFO NHibernate.Persister.GetSetHelperFactory - Disabling reflection optimizer for class Com.Klinitek.Census.Model.CensusUserPreferences
2006-02-01 11:45:47,609 DEBUG NHibernate.Persister.GetSetHelperFactory - CodeDOM compilation failed
System.InvalidOperationException: Unexpected character '`'
at NHibernate.Persister.GetSetHelperFactory.Build(String code)
at NHibernate.Persister.GetSetHelperFactory.CreateGetSetHelper()
2006-02-01 11:45:47,609 DEBUG NHibernate.Cfg.Binder - Mapped property: SortColumn -> sort_column, type: String
2006-02-01 11:45:47,609 DEBUG NHibernate.Cfg.Binder - Mapped property: CensusSort -> id_census_sort, type: CensusSort
2006-02-01 11:45:47,609 DEBUG NHibernate.Cfg.Binder - Mapped property: RecordsPerPage -> records_per_page, type: Int32
2006-02-01 11:45:47,609 DEBUG NHibernate.Cfg.Binder - Mapped property: PrintSpacing -> print_spacing, type: Int32
2006-02-01 11:45:47,609 DEBUG NHibernate.Cfg.Configuration - properties: System.Collections.Hashtable
2006-02-01 11:45:47,625 INFO NHibernate.Cfg.Configuration - processing one-to-many association mappings
2006-02-01 11:45:47,625 DEBUG NHibernate.Cfg.Binder - Second pass for collection: Com.Klinitek.Census.Model.CensusSort.SortEntries
2006-02-01 11:45:47,625 INFO NHibernate.Cfg.Binder - mapping collection: Com.Klinitek.Census.Model.CensusSort.SortEntries -> CensusSortEntry
2006-02-01 11:45:47,625 DEBUG NHibernate.Cfg.Binder - Mapped collection key: id_census_sort, one-to-many: CensusSortEntry
2006-02-01 11:45:47,625 DEBUG NHibernate.Cfg.Binder - Second pass for collection: Com.Klinitek.Census.Model.CensusEntity.PhysicianGroups
2006-02-01 11:45:47,640 DEBUG NHibernate.Cfg.Binder - Mapped collection key: id_census, element: id_party, type: Int32
2006-02-01 11:45:47,640 DEBUG NHibernate.Cfg.Binder - Second pass for collection: Com.Klinitek.Census.Model.CensusEntity.Physicians
2006-02-01 11:45:47,640 DEBUG NHibernate.Cfg.Binder - Mapped collection key: id_census, element: id_person, type: Int32
2006-02-01 11:45:47,640 DEBUG NHibernate.Cfg.Binder - Second pass for collection: Com.Klinitek.Census.Model.CensusEntity.Patients
2006-02-01 11:45:47,640 DEBUG NHibernate.Cfg.Binder - Mapped collection key: id_census, element: id_patient, type: Int32
2006-02-01 11:45:47,640 DEBUG NHibernate.Cfg.Binder - Second pass for collection: Com.Klinitek.Census.Model.CensusEntity.POCs
2006-02-01 11:45:47,640 DEBUG NHibernate.Cfg.Binder - Mapped collection key: id_census, element: point_of_care, type: String
2006-02-01 11:45:47,640 DEBUG NHibernate.Cfg.Binder - Second pass for collection: Com.Klinitek.Census.Model.CensusEntity.PartyAccess
2006-02-01 11:45:47,640 INFO NHibernate.Cfg.Binder - mapping collection: Com.Klinitek.Census.Model.CensusEntity.PartyAccess -> CensusPartyAccess
2006-02-01 11:45:47,640 DEBUG NHibernate.Cfg.Binder - Mapped collection key: id_census, one-to-many: CensusPartyAccess
2006-02-01 11:45:47,640 DEBUG NHibernate.Cfg.Binder - Second pass for collection: Com.Klinitek.Census.Model.CensusEntity.UserAccess
2006-02-01 11:45:47,640 INFO NHibernate.Cfg.Binder - mapping collection: Com.Klinitek.Census.Model.CensusEntity.UserAccess -> CensusUserAccess
2006-02-01 11:45:47,640 DEBUG NHibernate.Cfg.Binder - Mapped collection key: id_census, one-to-many: CensusUserAccess
2006-02-01 11:45:47,640 DEBUG NHibernate.Cfg.Binder - Second pass for collection: Com.Klinitek.Census.Model.CensusEntity.CensusAlerts
2006-02-01 11:45:47,640 INFO NHibernate.Cfg.Binder - mapping collection: Com.Klinitek.Census.Model.CensusEntity.CensusAlerts -> CensusAlert
2006-02-01 11:45:47,640 DEBUG NHibernate.Cfg.Binder - Mapped collection key: id_census, one-to-many: CensusAlert
2006-02-01 11:45:47,640 DEBUG NHibernate.Cfg.Binder - Second pass for collection: Com.Klinitek.Census.Model.CensusEntity.Entries
2006-02-01 11:45:47,640 INFO NHibernate.Cfg.Binder - mapping collection: Com.Klinitek.Census.Model.CensusEntity.Entries -> CensusEntry
2006-02-01 11:45:47,640 DEBUG NHibernate.Cfg.Binder - Mapped collection key: id_census, one-to-many: CensusEntry
2006-02-01 11:45:47,640 INFO NHibernate.Cfg.Configuration - processing one-to-one association property references
2006-02-01 11:45:47,640 INFO NHibernate.Cfg.Configuration - processing foreign key constraints
2006-02-01 11:45:47,640 DEBUG NHibernate.Cfg.Configuration - resolving reference to class: CensusEntity
2006-02-01 11:45:47,640 DEBUG NHibernate.Cfg.Configuration - resolving reference to class: CensusEntity
2006-02-01 11:45:47,640 DEBUG NHibernate.Cfg.Configuration - resolving reference to class: CensusEntity
2006-02-01 11:45:47,640 DEBUG NHibernate.Cfg.Configuration - resolving reference to class: CensusEntity
2006-02-01 11:45:47,640 DEBUG NHibernate.Cfg.Configuration - resolving reference to class: CensusEntity
2006-02-01 11:45:47,640 DEBUG NHibernate.Cfg.Configuration - resolving reference to class: CensusEntity
2006-02-01 11:45:47,640 DEBUG NHibernate.Cfg.Configuration - resolving reference to class: CensusSort
2006-02-01 11:45:47,640 DEBUG NHibernate.Cfg.Configuration - resolving reference to class: CensusEntity
2006-02-01 11:45:47,640 DEBUG NHibernate.Cfg.Configuration - resolving reference to class: CensusEntity
2006-02-01 11:45:47,640 DEBUG NHibernate.Cfg.Configuration - resolving reference to class: CensusSort
2006-02-01 11:45:47,640 DEBUG NHibernate.Cfg.Configuration - resolving reference to class: CensusEntry
2006-02-01 11:45:47,640 DEBUG NHibernate.Cfg.Configuration - resolving reference to class: CensusEntity
2006-02-01 11:45:47,640 DEBUG NHibernate.Cfg.Configuration - resolving reference to class: CensusEntity
2006-02-01 11:45:47,656 INFO NHibernate.Dialect.Dialect - Using dialect: NHibernate.Dialect.MsSql2000Dialect
2006-02-01 11:45:47,656 INFO NHibernate.Cfg.SettingsFactory - use outer join fetching: True
2006-02-01 11:45:47,656 INFO NHibernate.Connection.ConnectionProviderFactory - Intitializing connection provider: NHibernate.Connection.DriverConnectionProvider
2006-02-01 11:45:47,656 INFO NHibernate.Connection.ConnectionProvider - Configuring ConnectionProvider
2006-02-01 11:45:47,656 INFO NHibernate.Cfg.SettingsFactory - Optimize cache for minimal puts: False
2006-02-01 11:45:47,656 INFO NHibernate.Cfg.SettingsFactory - echoing all SQL to stdout
2006-02-01 11:45:47,656 INFO NHibernate.Cfg.SettingsFactory - Query language substitutions: {}
2006-02-01 11:45:47,656 INFO NHibernate.Cfg.SettingsFactory - cache provider: NHibernate.Cache.HashtableCacheProvider
2006-02-01 11:45:47,656 INFO NHibernate.Cfg.Configuration - instantiating and configuring caches
2006-02-01 11:45:47,671 INFO NHibernate.Impl.SessionFactoryImpl - building session factory
2006-02-01 11:45:47,718 DEBUG NHibernate.Impl.SessionFactoryImpl - instantiating session factory with properties: {hibernate.use_outer_join=true, connection.connection_string=Server=(local);Database=Census;Trusted_Connection=True;Connection Timeout=15;, hibernate.connection.connection_string=Server=(local);Database=Census;Trusted_Connection=True;Connection Timeout=15;, connection.provider=NHibernate.Connection.DriverConnectionProvider, connection.driver_class=NHibernate.Driver.SqlClientDriver, hibernate.connection.driver_class=NHibernate.Driver.SqlClientDriver, hibernate.show_sql=true, hibernate.use_reflection_optimizer=True, hibernate.dialect=NHibernate.Dialect.MsSql2000Dialect, use_outer_join=true, dialect=NHibernate.Dialect.MsSql2000Dialect, hibernate.connection.provider=NHibernate.Connection.DriverConnectionProvider, show_sql=true}
2006-02-01 11:45:47,750 DEBUG NHibernate.Persister.GetSetHelperFactory - Init compiler for class Com.Klinitek.Census.Model.CensusUserAccess
2006-02-01 11:45:47,765 DEBUG NHibernate.Persister.GetSetHelperFactory - Adding referenced assembly C:\Documents and Settings\Kevin Chan\Local Settings\Temp\nunit20\ShadowCopyCache\632743911444531250\Tests\assembly\dl3\762a4853\0091880d_1f1ac601\NHibernate.DLL
2006-02-01 11:45:47,765 DEBUG NHibernate.Persister.GetSetHelperFactory - Adding referenced assembly C:\Documents and Settings\Kevin Chan\Local Settings\Temp\nunit20\ShadowCopyCache\632743911444531250\Tests\assembly\dl3\9238375d\822a9f7b_6727c601\Com.Klinitek.Census.DLL
2006-02-01 11:45:47,765 DEBUG NHibernate.Persister.GetSetHelperFactory - Adding referenced assembly C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\mscorlib.dll
2006-02-01 11:45:47,765 DEBUG NHibernate.Persister.GetSetHelperFactory - Adding referenced assembly C:\WINDOWS\assembly\GAC_32\System.Web\2.0.0.0__b03f5f7f11d50a3a\System.Web.dll
2006-02-01 11:45:47,765 DEBUG NHibernate.Persister.GetSetHelperFactory - Adding referenced assembly C:\Documents and Settings\Kevin Chan\Local Settings\Temp\nunit20\ShadowCopyCache\632743911444531250\Tests\assembly\dl3\b92ba56d\8cd52c3b_8a20c601\Com.Klinitek.Logging.DLL
2006-02-01 11:45:47,765 DEBUG NHibernate.Persister.GetSetHelperFactory - Adding referenced assembly C:\Documents and Settings\Kevin Chan\Local Settings\Temp\nunit20\ShadowCopyCache\632743911444531250\Tests\assembly\dl3\28112091\00ce1670_1f1ec601\Iesi.Collections.DLL
2006-02-01 11:45:47,765 DEBUG NHibernate.Persister.GetSetHelperFactory - Adding referenced assembly C:\WINDOWS\assembly\GAC_32\System.Data\2.0.0.0__b77a5c561934e089\System.Data.dll
2006-02-01 11:45:47,812 DEBUG NHibernate.Persister.GetSetHelperFactory - Compiled with error:
using System;
using NHibernate.Property;
namespace NHibernate.Persister {
public class GetSetHelper_Com_Klinitek_Census_Model_CensusUserAccess : IGetSetHelper {
ISetter[] setters;
IGetter[] getters;
public GetSetHelper_Com_Klinitek_Census_Model_CensusUserAccess(ISetter[] setters, IGetter[] getters) {
this.setters = setters;
this.getters = getters;
}
public void SetPropertyValues(object obj, object[] values) {
Com.Klinitek.Census.Model.CensusUserAccess t = (Com.Klinitek.Census.Model.CensusUserAccess)obj;
try
{
t.DateStart = values[0] == null ? new System.Nullable`1[[System.DateTime, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]]() : (System.Nullable`1[[System.DateTime, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]])values[0];
t.DateEnd = values[1] == null ? new System.Nullable`1[[System.DateTime, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]]() : (System.Nullable`1[[System.DateTime, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]])values[1];
}
catch( InvalidCastException ice )
{
throw new MappingException(
"Invalid mapping information specified for type " + obj.GetType() + ", check your mapping file for property type mismatches",
ice);
}
}
public object[] GetPropertyValues(object obj) {
Com.Klinitek.Census.Model.CensusUserAccess t = (Com.Klinitek.Census.Model.CensusUserAccess)obj;
object[] ret = new object[2];
ret[0] = t.DateStart;
ret[1] = t.DateEnd;
return ret;
}
}
}

2006-02-01 11:45:47,828 DEBUG NHibernate.Persister.GetSetHelperFactory - Line:15, Column:56 Message:Unexpected character '`'
2006-02-01 11:45:47,828 DEBUG NHibernate.Persister.GetSetHelperFactory - Line:15, Column:175 Message:Unexpected character '`'
2006-02-01 11:45:47,828 DEBUG NHibernate.Persister.GetSetHelperFactory - Line:16, Column:54 Message:Unexpected character '`'
2006-02-01 11:45:47,828 DEBUG NHibernate.Persister.GetSetHelperFactory - Line:16, Column:173 Message:Unexpected character '`'
2006-02-01 11:45:47,828 INFO NHibernate.Persister.GetSetHelperFactory - Disabling reflection optimizer for class Com.Klinitek.Census.Model.CensusUserAccess
2006-02-01 11:45:47,828 DEBUG NHibernate.Persister.GetSetHelperFactory - CodeDOM compilation failed
System.InvalidOperationException: Unexpected character '`'
at NHibernate.Persister.GetSetHelperFactory.Build(String code)
at NHibernate.Persister.GetSetHelperFactory.CreateGetSetHelper()
2006-02-01 11:45:47,843 DEBUG NHibernate.Persister.GetSetHelperFactory - Init compiler for class Com.Klinitek.Census.Model.Location
2006-02-01 11:45:47,843 DEBUG NHibernate.Persister.GetSetHelperFactory - Adding referenced assembly C:\Documents and Settings\Kevin Chan\Local Settings\Temp\nunit20\ShadowCopyCache\632743911444531250\Tests\assembly\dl3\762a4853\0091880d_1f1ac601\NHibernate.DLL
2006-02-01 11:45:47,843 DEBUG NHibernate.Persister.GetSetHelperFactory - Adding referenced assembly C:\Documents and Settings\Kevin Chan\Local Settings\Temp\nunit20\ShadowCopyCache\632743911444531250\Tests\assembly\dl3\9238375d\822a9f7b_6727c601\Com.Klinitek.Census.DLL
2006-02-01 11:45:47,843 DEBUG NHibernate.Persister.GetSetHelperFactory - Adding referenced assembly C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\mscorlib.dll
2006-02-01 11:45:47,843 DEBUG NHibernate.Persister.GetSetHelperFactory - Adding referenced assembly C:\WINDOWS\assembly\GAC_32\System.Web\2.0.0.0__b03f5f7f11d50a3a\System.Web.dll
2006-02-01 11:45:47,843 DEBUG NHibernate.Persister.GetSetHelperFactory - Adding referenced assembly C:\Documents and Settings\Kevin Chan\Local Settings\Temp\nunit20\ShadowCopyCache\632743911444531250\Tests\assembly\dl3\b92ba56d\8cd52c3b_8a20c601\Com.Klinitek.Logging.DLL
2006-02-01 11:45:47,843 DEBUG NHibernate.Persister.GetSetHelperFactory - Adding referenced assembly C:\Documents and Settings\Kevin Chan\Local Settings\Temp\nunit20\ShadowCopyCache\632743911444531250\Tests\assembly\dl3\28112091\00ce1670_1f1ec601\Iesi.Collections.DLL
2006-02-01 11:45:47,843 DEBUG NHibernate.Persister.GetSetHelperFactory - Adding referenced assembly C:\WINDOWS\assembly\GAC_32\System.Data\2.0.0.0__b77a5c561934e089\System.Data.dll
2006-02-01 11:45:47,906 DEBUG NHibernate.Persister.GetSetHelperFactory - Compiled with error:
using System;
using NHibernate.Property;
namespace NHibernate.Persister {
public class GetSetHelper_Com_Klinitek_Census_Model_Location : IGetSetHelper {
ISetter[] setters;
IGetter[] getters;
public GetSetHelper_Com_Klinitek_Census_Model_Location(ISetter[] setters, IGetter[] getters) {
this.setters = setters;
this.getters = getters;
}
public void SetPropertyValues(object obj, object[] values) {
Com.Klinitek.Census.Model.Location t = (Com.Klinitek.Census.Model.Location)obj;
try
{
t.DateLastModified = values[0] == null ? new System.Nullable`1[[System.DateTime, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]]() : (System.Nullable`1[[System.DateTime, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]])values[0];
t.Status = (System.String)values[1];
t.Room = (System.String)values[2];
t.Bed = (System.String)values[3];
t.IsSwing = values[4] == null ? new System.Nullable`1[[System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]]() : (System.Nullable`1[[System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]])values[4];
t.DateCreated = values[5] == null ? new System.Nullable`1[[System.DateTime, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]]() : (System.Nullable`1[[System.DateTime, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]])values[5];
t.PointOfCare = (System.String)values[6];
t.Description = (System.String)values[7];
t.Type = (System.String)values[8];
}
catch( InvalidCastException ice )
{
throw new MappingException(
"Invalid mapping information specified for type " + obj.GetType() + ", check your mapping file for property type mismatches",
ice);
}
}
public object[] GetPropertyValues(object obj) {
Com.Klinitek.Census.Model.Location t = (Com.Klinitek.Census.Model.Location)obj;
object[] ret = new object[9];
ret[0] = t.DateLastModified;
ret[1] = t.Status;
ret[2] = t.Room;
ret[3] = t.Bed;
ret[4] = t.IsSwing;
ret[5] = t.DateCreated;
ret[6] = t.PointOfCare;
ret[7] = t.Description;
ret[8] = t.Type;
return ret;
}
}
}

2006-02-01 11:45:47,906 DEBUG NHibernate.Persister.GetSetHelperFactory - Line:15, Column:63 Message:Unexpected character '`'
2006-02-01 11:45:47,906 DEBUG NHibernate.Persister.GetSetHelperFactory - Line:15, Column:182 Message:Unexpected character '`'
2006-02-01 11:45:47,906 DEBUG NHibernate.Persister.GetSetHelperFactory - Line:19, Column:54 Message:Unexpected character '`'
2006-02-01 11:45:47,906 DEBUG NHibernate.Persister.GetSetHelperFactory - Line:19, Column:172 Message:Unexpected character '`'
2006-02-01 11:45:47,906 DEBUG NHibernate.Persister.GetSetHelperFactory - Line:20, Column:58 Message:Unexpected character '`'
2006-02-01 11:45:47,906 DEBUG NHibernate.Persister.GetSetHelperFactory - Line:20, Column:177 Message:Unexpected character '`'
2006-02-01 11:45:47,921 INFO NHibernate.Persister.GetSetHelperFactory - Disabling reflection optimizer for class Com.Klinitek.Census.Model.Location
2006-02-01 11:45:47,921 DEBUG NHibernate.Persister.GetSetHelperFactory - CodeDOM compilation failed
System.InvalidOperationException: Unexpected character '`'
at NHibernate.Persister.GetSetHelperFactory.Build(String code)
at NHibernate.Persister.GetSetHelperFactory.CreateGetSetHelper()
2006-02-01 11:45:47,921 DEBUG NHibernate.Persister.GetSetHelperFactory - Init compiler for class Com.Klinitek.Census.Model.CensusPartyAccess
2006-02-01 11:45:47,921 DEBUG NHibernate.Persister.GetSetHelperFactory - Adding referenced assembly C:\Documents and Settings\Kevin Chan\Local Settings\Temp\nunit20\ShadowCopyCache\632743911444531250\Tests\assembly\dl3\762a4853\0091880d_1f1ac601\NHibernate.DLL
2006-02-01 11:45:47,921 DEBUG NHibernate.Persister.GetSetHelperFactory - Adding referenced assembly C:\Documents and Settings\Kevin Chan\Local Settings\Temp\nunit20\ShadowCopyCache\632743911444531250\Tests\assembly\dl3\9238375d\822a9f7b_6727c601\Com.Klinitek.Census.DLL
2006-02-01 11:45:47,921 DEBUG NHibernate.Persister.GetSetHelperFactory - Adding referenced assembly C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\mscorlib.dll
2006-02-01 11:45:47,921 DEBUG NHibernate.Persister.GetSetHelperFactory - Adding referenced assembly C:\WINDOWS\assembly\GAC_32\System.Web\2.0.0.0__b03f5f7f11d50a3a\System.Web.dll
2006-02-01 11:45:47,921 DEBUG NHibernate.Persister.GetSetHelperFactory - Adding referenced assembly C:\Documents and Settings\Kevin Chan\Local Settings\Temp\nunit20\ShadowCopyCache\632743911444531250\Tests\assembly\dl3\b92ba56d\8cd52c3b_8a20c601\Com.Klinitek.Logging.DLL
2006-02-01 11:45:47,921 DEBUG NHibernate.Persister.GetSetHelperFactory - Adding referenced assembly C:\Documents and Settings\Kevin Chan\Local Settings\Temp\nunit20\ShadowCopyCache\632743911444531250\Tests\assembly\dl3\28112091\00ce1670_1f1ec601\Iesi.Collections.DLL
2006-02-01 11:45:47,921 DEBUG NHibernate.Persister.GetSetHelperFactory - Adding referenced assembly C:\WINDOWS\assembly\GAC_32\System.Data\2.0.0.0__b77a5c561934e089\System.Data.dll
2006-02-01 11:45:47,984 DEBUG NHibernate.Persister.GetSetHelperFactory - Compiled with error:
using System;
using NHibernate.Property;
namespace NHibernate.Persister {
public class GetSetHelper_Com_Klinitek_Census_Model_CensusPartyAccess : IGetSetHelper {
ISetter[] setters;
IGetter[] getters;
public GetSetHelper_Com_Klinitek_Census_Model_CensusPartyAccess(ISetter[] setters, IGetter[] getters) {
this.setters = setters;
this.getters = getters;
}
public void SetPropertyValues(object obj, object[] values) {
Com.Klinitek.Census.Model.CensusPartyAccess t = (Com.Klinitek.Census.Model.CensusPartyAccess)obj;
try
{
t.DateStart = values[0] == null ? new System.Nullable`1[[System.DateTime, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]]() : (System.Nullable`1[[System.DateTime, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]])values[0];
t.DateEnd = values[1] == null ? new System.Nullable`1[[System.DateTime, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]]() : (System.Nullable`1[[System.DateTime, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]])values[1];
}
catch( InvalidCastException ice )
{
throw new MappingException(
"Invalid mapping information specified for type " + obj.GetType() + ", check your mapping file for property type mismatches",
ice);
}
}
public object[] GetPropertyValues(object obj) {
Com.Klinitek.Census.Model.CensusPartyAccess t = (Com.Klinitek.Census.Model.CensusPartyAccess)obj;
object[] ret = new object[2];
ret[0] = t.DateStart;
ret[1] = t.DateEnd;
return ret;
}
}
}

2006-02-01 11:45:47,984 DEBUG NHibernate.Persister.GetSetHelperFactory - Line:15, Column:56 Message:Unexpected character '`'
2006-02-01 11:45:47,984 DEBUG NHibernate.Persister.GetSetHelperFactory - Line:15, Column:175 Message:Unexpected character '`'
2006-02-01 11:45:47,984 DEBUG NHibernate.Persister.GetSetHelperFactory - Line:16, Column:54 Message:Unexpected character '`'
2006-02-01 11:45:47,984 DEBUG NHibernate.Persister.GetSetHelperFactory - Line:16, Column:173 Message:Unexpected character '`'
2006-02-01 11:45:47,984 INFO NHibernate.Persister.GetSetHelperFactory - Disabling reflection optimizer for class Com.Klinitek.Census.Model.CensusPartyAccess
2006-02-01 11:45:47,984 DEBUG NHibernate.Persister.GetSetHelperFactory - CodeDOM compilation failed
System.InvalidOperationException: Unexpected character '`'
at NHibernate.Persister.GetSetHelperFactory.Build(String code)
at NHibernate.Persister.GetSetHelperFactory.CreateGetSetHelper()
2006-02-01 11:45:47,984 DEBUG NHibernate.Persister.GetSetHelperFactory - Init compiler for class Com.Klinitek.Census.Model.CensusSortEntry
2006-02-01 11:45:47,984 DEBUG NHibernate.Persister.GetSetHelperFactory - Adding referenced assembly C:\Documents and Settings\Kevin Chan\Local Settings\Temp\nunit20\ShadowCopyCache\632743911444531250\Tests\assembly\dl3\762a4853\0091880d_1f1ac601\NHibernate.DLL
2006-02-01 11:45:47,984 DEBUG NHibernate.Persister.GetSetHelperFactory - Adding referenced assembly C:\Documents and Settings\Kevin Chan\Local Settings\Temp\nunit20\ShadowCopyCache\632743911444531250\Tests\assembly\dl3\9238375d\822a9f7b_6727c601\Com.Klinitek.Census.DLL
2006-02-01 11:45:47,984 DEBUG NHibernate.Persister.GetSetHelperFactory - Adding referenced assembly C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\mscorlib.dll
2006-02-01 11:45:47,984 DEBUG NHibernate.Persister.GetSetHelperFactory - Adding referenced assembly C:\WINDOWS\assembly\GAC_32\System.Web\2.0.0.0__b03f5f7f11d50a3a\System.Web.dll
2006-02-01 11:45:48,000 DEBUG NHibernate.Persister.GetSetHelperFactory - Adding referenced assembly C:\Documents and Settings\Ke


Top
 Profile  
 
 Post subject:
PostPosted: Thu Feb 23, 2006 8:34 pm 
Newbie

Joined: Wed Feb 01, 2006 3:30 pm
Posts: 7
A similar problem seems to happen when I pass a transient instance to Session.Update(). The sets mapped with one-to-many are not recognizing when I remove an element from the set and thus not deleting the orphans.

I am passing in a transient instance that is created from a web page that is orignially populated by an instance gotten from an open session. After the orignal object populates the form fields the first time, the user adds and removes items from the collections using the controls on the page and then when the user clicks save the entity is recreated from the form fields on the page and passed to Session.Update().

Is there anyway to Update an Nhibernate object like such and have Cascade all-delete-orphan work?


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 2 posts ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.