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.  [ 10 posts ] 
Author Message
 Post subject: Serious problem with loading collection of dependent objects
PostPosted: Fri Jun 29, 2007 5:10 am 
Newbie

Joined: Mon Jun 25, 2007 4:19 am
Posts: 8
I tried to read everything and done everything but couldn't find a way to find the reason of this problem. You will find detailed information below, but first I will describe the problem:

I have a Contract class which has an IList containing RevenueRecognition instances. I think the mapping decleration is correct because I don't have any problems with saving. Saving is working properly for Contract.
When loading, all of the fields are loaded correctly BUT the problem is: an empty ArrayList is assigned to the RevenueRecognitions field.
When I debug and watch DB System's tracing tool, the SQL for fetching RevenueRecognitions is correct and returns 3 rows. But then I see that NHibernate uses the set part of the RevenueRecognitions property:
set { revenueRecognitions = value; }
BUT THE VALUE IS AN EMPTY ArrayList!!!!!!

I can't even find an approach to find the source of the problem. There is no exception, no compiling problem, just the evil empty ArrayList.
I you can help me I would really appreciate it. If the below information is insufficient, ask me for any information you need.
Thank you very much.

NHibernate version: 1.2.0
Mapping Documents:
Contract.hbm.xml

<?xml version="1.0" encoding="utf-8" ?>
<hibernate-mapping xmlns="urn:nhibernate-mapping-2.2"
namespace="RevenueRecognitionNamespace" assembly="RevenueRecognition.Domain">
<class name="RevenueRecognitionNamespace.Contract" table="Contract" lazy="false">
<id name="Id">
<column name="contract_id" sql-type="char(64)" not-null="true"/>
<generator class="uuid.hex" />
</id>
<many-to-one name="Product" class="Product" column="product_id"/>

<component name="Revenue" class="RevenueRecognitionNamespace.Money">
<property name="Cents" column="cents" />
<property name="CurrencySymbol" column="currency" />
<property name="Digits" column="decimal_digits" />
</component>

<property name="WhenSigned" column="when_signed" type="System.DateTime"/>

<list name="RevenueRecognitions" table="RevenueRecognitions" lazy="false">
<key column="contract_id" />
<index column="list_index" type="int" />
<composite-element class="RevenueRecognition">
<nested-composite-element class="RevenueRecognitionNamespace.Money" name="Amount">
<property name="Cents" column="cents" />
<property name="CurrencySymbol" column="currency" />
<property name="Digits" column="decimal_digits" />
</nested-composite-element>
<property name="Date" column="date"/>
</composite-element>

</list>
</class>
</hibernate-mapping>

Persistent Class Definitions:

public class Contract
{
private string id;
private Product product;
private Money revenue;
private DateTime whenSigned;
private IList revenueRecognitions;

public virtual IList RevenueRecognitions
{
get { return revenueRecognitions; }
set { revenueRecognitions = value; }
}
public virtual string Id
{
get { return id; }
set { id = value; }
}
public virtual Money Revenue
{
get { return revenue; }
set { revenue = value; }
}
public virtual DateTime WhenSigned
{
get { return whenSigned; }
set { whenSigned = value; }
}

protected virtual Product Product
{
get { return product; }
set { product = value; }
}

public Contract()
{
// For NHibernate
}

public Contract(Product product, Money revenue, DateTime whenSigned)
{
this.product = product;
this.revenue = revenue;
this.whenSigned = whenSigned;
this.revenueRecognitions = new ArrayList();
}

public virtual void AddRevenueRecognition(RevenueRecognition revenueRecognition)
{
revenueRecognitions.Add(revenueRecognition);
}
}
}


public class RevenueRecognition
{
private Money amount;
private DateTime date;

// For NHibernate
private RevenueRecognition()
{}

public RevenueRecognition(Money amount, DateTime date)
{
this.amount = amount;
this.date = date;
}

public virtual Money Amount
{
get { return amount; }
set { amount = value; }
}

public virtual DateTime Date
{
get { return date; }
set { date = value; }
}

public override bool Equals(object obj)
{
if (this == obj)
return true;

if (Amount != ((RevenueRecognition)obj).Amount)
return false;

if (Date != ((RevenueRecognition)obj).Date)
return false;

return true;
}

public override int GetHashCode()
{
unchecked
{
return Amount.GetHashCode() * 2 + Date.Day.GetHashCode();
}
}

}


public class Money {
private static int[] cents = new int[] { 1, 10, 100, 1000 };
CultureInfo cultureInfo;
RegionInfo regionInfo;
long amount;
string currencySymbol;
int decimalDigits;
//....
}

Name and version of the database: SQL Server 2005

The generated SQLs:

exec sp_executesql N'SELECT contract0_.contract_id as contract1_0_1_, contract0_.product_id as product2_0_1_, contract0_.cents as cents0_1_,
contract0_.currency as currency0_1_, contract0_.decimal_digits as decimal5_0_1_, contract0_.when_signed as when6_0_1_, product1_.product_id as
product1_2_0_, product1_.name as name2_0_ FROM Contract contract0_ left outer join Product product1_ on contract0_.product_id=product1_.product_id WHERE
contract0_.contract_id=@p0',N'@p0 nvarchar(32)',@p0=N'e3429e2423d441718eac5fc93ec07ceb'

exec sp_executesql N'SELECT revenuerec0_.contract_id as contract1___0_, revenuerec0_.cents as cents0_, revenuerec0_.currency as currency0_,
revenuerec0_.decimal_digits as decimal4_0_, revenuerec0_.date as date0_, revenuerec0_.list_index as list6___0_ FROM RevenueRecognitions revenuerec0_ WHERE
revenuerec0_.contract_id=@p0',N'@p0 nvarchar(32)',@p0=N'e3429e2423d441718eac5fc93ec07ceb'


Top
 Profile  
 
 Post subject:
PostPosted: Fri Jun 29, 2007 5:24 am 
Contributor
Contributor

Joined: Wed May 11, 2005 4:59 pm
Posts: 1766
Location: Prague, Czech Republic
Please post the code you use to load the object, and the relevant part of debug-level NHibernate logs as well.


Top
 Profile  
 
 Post subject:
PostPosted: Fri Jun 29, 2007 5:51 am 
Newbie

Joined: Mon Jun 25, 2007 4:19 am
Posts: 8
Below is the relevant source code. I don't know how to use log4net yet but i'll try to get those logs and post them here soon.

{
Contract loadedContract = ContractMapper.LoadWithId(contract.Id);
}


public class ContractMapper
{
public static Contract LoadWithId(string contractId)
{
ISession session = Session.Instance();

return (Contract)session.Load(typeof(Contract), contractId);
}
}


public class Session
{
private static ISessionFactory _sessionFactory;
private static ISession _session;
private static Configuration _config;

static Session()
{
_config = new Configuration();
_sessionFactory = _config.Configure().BuildSessionFactory();
}

public static ISession Instance()
{
if (_session == null || !_session.IsOpen)
{
_session = _sessionFactory.OpenSession();
}

if (!_session.IsConnected)
_session.Reconnect();

return _session;
}


}


Top
 Profile  
 
 Post subject:
PostPosted: Fri Jun 29, 2007 6:31 am 
Contributor
Contributor

Joined: Wed May 11, 2005 4:59 pm
Posts: 1766
Location: Prague, Czech Republic
See http://www.hibernate.org/Documentation/ConfiguringLog4netForUseWithNHibernate


Top
 Profile  
 
 Post subject:
PostPosted: Fri Jun 29, 2007 7:55 am 
Newbie

Joined: Mon Jun 25, 2007 4:19 am
Posts: 8
Log messages are listed below. When I tested log4net in another simple application, more types of log messages were written. I don't know why they didn't appear in my problematic application. I'll try to get more types of log messages and post them here.
Do you have any idea about the reason of the problem in the light of these log messages?

2007-06-29 14:49:39,843 [AdpaterExeMgrThread1] DEBUG NHibernate.SQL - INSERT INTO Product (name, product_id) VALUES (@p0, @p1); @p0 = 'DB', @p1 = '7fe8539f73194166a5063e723474fba6'
2007-06-29 14:49:40,546 [AdpaterExeMgrThread1] DEBUG NHibernate.SQL - INSERT INTO Contract (product_id, cents, currency, decimal_digits, when_signed, contract_id) VALUES (@p0, @p1, @p2, @p3, @p4, @p5); @p0 = '7fe8539f73194166a5063e723474fba6', @p1 = '500', @p2 = 'TRY', @p3 = '2', @p4 = '29.06.2007 14:49:36', @p5 = 'b43171fbedfd46db9866a9fce9bb5216'
2007-06-29 14:49:40,578 [AdpaterExeMgrThread1] DEBUG NHibernate.SQL - INSERT INTO RevenueRecognitions (contract_id, list_index, cents, currency, decimal_digits, date) VALUES (@p0, @p1, @p2, @p3, @p4, @p5); @p0 = 'b43171fbedfd46db9866a9fce9bb5216', @p1 = '0', @p2 = '167', @p3 = 'TRY', @p4 = '2', @p5 = '29.06.2007 14:49:36'
2007-06-29 14:49:40,578 [AdpaterExeMgrThread1] DEBUG NHibernate.SQL - INSERT INTO RevenueRecognitions (contract_id, list_index, cents, currency, decimal_digits, date) VALUES (@p0, @p1, @p2, @p3, @p4, @p5); @p0 = 'b43171fbedfd46db9866a9fce9bb5216', @p1 = '1', @p2 = '167', @p3 = 'TRY', @p4 = '2', @p5 = '29.07.2007 14:49:36'
2007-06-29 14:49:40,578 [AdpaterExeMgrThread1] DEBUG NHibernate.SQL - INSERT INTO RevenueRecognitions (contract_id, list_index, cents, currency, decimal_digits, date) VALUES (@p0, @p1, @p2, @p3, @p4, @p5); @p0 = 'b43171fbedfd46db9866a9fce9bb5216', @p1 = '2', @p2 = '166', @p3 = 'TRY', @p4 = '2', @p5 = '28.08.2007 14:49:36'
2007-06-29 14:49:41,125 [AdpaterExeMgrThread1] INFO NHibernate.Loader.Loader - SELECT contract0_.contract_id as contract1_0_1_, contract0_.product_id as product2_0_1_, contract0_.cents as cents0_1_, contract0_.currency as currency0_1_, contract0_.decimal_digits as decimal5_0_1_, contract0_.when_signed as when6_0_1_, product1_.product_id as product1_2_0_, product1_.name as name2_0_ FROM Contract contract0_ left outer join Product product1_ on contract0_.product_id=product1_.product_id WHERE contract0_.contract_id=@p0
2007-06-29 14:49:41,125 [AdpaterExeMgrThread1] DEBUG NHibernate.SQL - SELECT contract0_.contract_id as contract1_0_1_, contract0_.product_id as product2_0_1_, contract0_.cents as cents0_1_, contract0_.currency as currency0_1_, contract0_.decimal_digits as decimal5_0_1_, contract0_.when_signed as when6_0_1_, product1_.product_id as product1_2_0_, product1_.name as name2_0_ FROM Contract contract0_ left outer join Product product1_ on contract0_.product_id=product1_.product_id WHERE contract0_.contract_id=@p0; @p0 = 'b43171fbedfd46db9866a9fce9bb5216'
2007-06-29 14:49:41,187 [AdpaterExeMgrThread1] INFO NHibernate.Loader.Loader - SELECT revenuerec0_.contract_id as contract1___0_, revenuerec0_.cents as cents0_, revenuerec0_.currency as currency0_, revenuerec0_.decimal_digits as decimal4_0_, revenuerec0_.date as date0_, revenuerec0_.list_index as list6___0_ FROM RevenueRecognitions revenuerec0_ WHERE revenuerec0_.contract_id=@p0
2007-06-29 14:49:41,187 [AdpaterExeMgrThread1] DEBUG NHibernate.SQL - SELECT revenuerec0_.contract_id as contract1___0_, revenuerec0_.cents as cents0_, revenuerec0_.currency as currency0_, revenuerec0_.decimal_digits as decimal4_0_, revenuerec0_.date as date0_, revenuerec0_.list_index as list6___0_ FROM RevenueRecognitions revenuerec0_ WHERE revenuerec0_.contract_id=@p0; @p0 = 'b43171fbedfd46db9866a9fce9bb5216'


Top
 Profile  
 
 Post subject:
PostPosted: Fri Jun 29, 2007 11:20 am 
Contributor
Contributor

Joined: Wed May 11, 2005 4:59 pm
Posts: 1766
Location: Prague, Czech Republic
These are just SQL logs, they are not enough to understand what's happening. Check your log4net configuration, log level for "NHibernate" should be set to DEBUG, something like this:
Code:
        <logger name="NHibernate">
            <level value="DEBUG"/>
        </logger>


Top
 Profile  
 
 Post subject:
PostPosted: Mon Jul 02, 2007 8:30 am 
Newbie

Joined: Mon Jun 25, 2007 4:19 am
Posts: 8
Below is the source code (I have made the configuration method inline) and all the log messages that I have taken.

As you see in the source code, I create a Product, a Contract and save them. There is no problem here, the RevenueRecognitions property is mapped and saved properly. And there is no problem with loading except the RevenueRecognitions propery is EMPTY.
Those log messages include logs about loading the RevenueRecognitions collection. I hope these are sufficient to understand what happens. I will be gratefull if I learn why that ArrayList is empty.
Thank you very much.

SOURCE CODE:

{
Product product = Product.newDatabase("DB");
DateTime now = DateTime.Now;
Contract contract = new Contract(product, new Money(5), now);
contract.CalculateRecognitions();

ProductMapper.Save(product);
ContractMapper.Save(contract);

Contract loadedContract = ContractMapper.LoadWithId (contract.Id);
}

public static Contract LoadWithId(string contractId)
{
ISession session = new Configuration().Configure ().BuildSessionFactory().OpenSession();

return (Contract)session.Load(typeof(Contract), contractId);
}


LOG MESSAGES:

2007-07-02 15:12:22,296 [AdpaterExeMgrThread1] DEBUG NHibernate.Impl.SessionImpl [(null)] <(null)> - opened session
2007-07-02 15:12:22,343 [AdpaterExeMgrThread1] DEBUG NHibernate.Transaction.AdoTransaction [(null)] <(null)> - begin
2007-07-02 15:12:22,343 [AdpaterExeMgrThread1] DEBUG NHibernate.Connection.DriverConnectionProvider [(null)] <(null)> - Obtaining IDbConnection from Driver
2007-07-02 15:12:22,750 [AdpaterExeMgrThread1] DEBUG NHibernate.Impl.SessionImpl [(null)] <(null)> - generated identifier: 281b4fcbac8a48eb90e300e8f81492ee
2007-07-02 15:12:22,750 [AdpaterExeMgrThread1] DEBUG NHibernate.Impl.SessionImpl [(null)] <(null)> - saving [RevenueRecognitionNamespace.Product#281b4fcbac8a48eb90e300e8f81492ee]
2007-07-02 15:12:22,765 [AdpaterExeMgrThread1] DEBUG NHibernate.Transaction.AdoTransaction [(null)] <(null)> - commit
2007-07-02 15:12:22,765 [AdpaterExeMgrThread1] DEBUG NHibernate.Impl.SessionImpl [(null)] <(null)> - flushing session
2007-07-02 15:12:22,765 [AdpaterExeMgrThread1] DEBUG NHibernate.Impl.SessionImpl [(null)] <(null)> - Flushing entities and processing referenced collections
2007-07-02 15:12:22,781 [AdpaterExeMgrThread1] DEBUG NHibernate.Impl.SessionImpl [(null)] <(null)> - Processing unreferenced collections
2007-07-02 15:12:22,781 [AdpaterExeMgrThread1] DEBUG NHibernate.Impl.SessionImpl [(null)] <(null)> - scheduling collection removes/(re)creates/updates
2007-07-02 15:12:22,781 [AdpaterExeMgrThread1] DEBUG NHibernate.Impl.SessionImpl [(null)] <(null)> - Flushed: 1 insertions, 0 updates, 0 deletions to 1 objects
2007-07-02 15:12:22,781 [AdpaterExeMgrThread1] DEBUG NHibernate.Impl.SessionImpl [(null)] <(null)> - Flushed: 0 (re)creations, 0 updates, 0 removals to 0 collections
2007-07-02 15:12:22,781 [AdpaterExeMgrThread1] DEBUG NHibernate.Impl.Printer [(null)] <(null)> - listing entities:
2007-07-02 15:12:22,781 [AdpaterExeMgrThread1] DEBUG NHibernate.Impl.Printer [(null)] <(null)> - RevenueRecognitionNamespace.Product{Name=DB, Id=281b4fcbac8a48eb90e300e8f81492ee}
2007-07-02 15:12:22,781 [AdpaterExeMgrThread1] DEBUG NHibernate.Impl.SessionImpl [(null)] <(null)> - executing flush
2007-07-02 15:12:22,781 [AdpaterExeMgrThread1] DEBUG NHibernate.Impl.ConnectionManager [(null)] <(null)> - registering flush begin
2007-07-02 15:12:22,796 [AdpaterExeMgrThread1] DEBUG NHibernate.Persister.Entity.AbstractEntityPersister [(null)] <(null)> - Inserting entity: [RevenueRecognitionNamespace.Product#281b4fcbac8a48eb90e300e8f81492ee]
2007-07-02 15:12:22,828 [AdpaterExeMgrThread1] DEBUG NHibernate.Impl.BatcherImpl [(null)] <(null)> - Opened new IDbCommand, open IDbCommands: 1
2007-07-02 15:12:22,828 [AdpaterExeMgrThread1] DEBUG NHibernate.Impl.BatcherImpl [(null)] <(null)> - Building an IDbCommand object for the SqlString: INSERT INTO Product (name, product_id) VALUES (?, ?)
2007-07-02 15:12:22,828 [AdpaterExeMgrThread1] DEBUG NHibernate.Persister.Entity.AbstractEntityPersister [(null)] <(null)> - Dehydrating entity: [RevenueRecognitionNamespace.Product#281b4fcbac8a48eb90e300e8f81492ee]
2007-07-02 15:12:22,828 [AdpaterExeMgrThread1] DEBUG NHibernate.SQL [(null)] <(null)> - INSERT INTO Product (name, product_id) VALUES (@p0, @p1); @p0 = 'DB', @p1 = '281b4fcbac8a48eb90e300e8f81492ee'
2007-07-02 15:12:22,875 [AdpaterExeMgrThread1] DEBUG NHibernate.Impl.BatcherImpl [(null)] <(null)> - Closed IDbCommand, open IDbCommands: 0
2007-07-02 15:12:22,875 [AdpaterExeMgrThread1] DEBUG NHibernate.Impl.ConnectionManager [(null)] <(null)> - registering flush end
2007-07-02 15:12:22,875 [AdpaterExeMgrThread1] DEBUG NHibernate.Impl.SessionImpl [(null)] <(null)> - post flush
2007-07-02 15:12:22,875 [AdpaterExeMgrThread1] DEBUG NHibernate.Impl.SessionImpl [(null)] <(null)> - before transaction completion
2007-07-02 15:12:22,890 [AdpaterExeMgrThread1] DEBUG NHibernate.Impl.ConnectionManager [(null)] <(null)> - aggressively releasing database connection
2007-07-02 15:12:22,890 [AdpaterExeMgrThread1] DEBUG NHibernate.Connection.ConnectionProvider [(null)] <(null)> - Closing connection
2007-07-02 15:12:22,890 [AdpaterExeMgrThread1] DEBUG NHibernate.Impl.SessionImpl [(null)] <(null)> - transaction completion
2007-07-02 15:12:22,906 [AdpaterExeMgrThread1] DEBUG NHibernate.Cache.UpdateTimestampsCache [(null)] <(null)> - Invalidating space [Product]
2007-07-02 15:12:22,906 [AdpaterExeMgrThread1] DEBUG NHibernate.Transaction.AdoTransaction [(null)] <(null)> - running AdoTransaction.Dispose()
2007-07-02 15:12:22,906 [AdpaterExeMgrThread1] DEBUG NHibernate.Impl.SessionImpl [(null)] <(null)> - closing session
2007-07-02 15:12:23,703 [AdpaterExeMgrThread1] DEBUG NHibernate.Impl.SessionImpl [(null)] <(null)> - opened session
2007-07-02 15:12:23,718 [AdpaterExeMgrThread1] DEBUG NHibernate.Transaction.AdoTransaction [(null)] <(null)> - begin
2007-07-02 15:12:23,718 [AdpaterExeMgrThread1] DEBUG NHibernate.Connection.DriverConnectionProvider [(null)] <(null)> - Obtaining IDbConnection from Driver
2007-07-02 15:12:23,718 [AdpaterExeMgrThread1] DEBUG NHibernate.Impl.SessionImpl [(null)] <(null)> - generated identifier: bfdb095a110b4d40b7259a45c23ab1d9
2007-07-02 15:12:23,718 [AdpaterExeMgrThread1] DEBUG NHibernate.Impl.SessionImpl [(null)] <(null)> - saving [RevenueRecognitionNamespace.Contract#bfdb095a110b4d40b7259a45c23ab1d9]
2007-07-02 15:12:23,718 [AdpaterExeMgrThread1] DEBUG NHibernate.Impl.WrapVisitor [(null)] <(null)> - Wrapped collection in role: RevenueRecognitionNamespace.Contract.RevenueRecognitions
2007-07-02 15:12:23,734 [AdpaterExeMgrThread1] DEBUG NHibernate.Engine.Cascades [(null)] <(null)> - unsaved-value:
2007-07-02 15:12:23,734 [AdpaterExeMgrThread1] DEBUG NHibernate.Transaction.AdoTransaction [(null)] <(null)> - commit
2007-07-02 15:12:23,734 [AdpaterExeMgrThread1] DEBUG NHibernate.Impl.SessionImpl [(null)] <(null)> - flushing session
2007-07-02 15:12:23,734 [AdpaterExeMgrThread1] DEBUG NHibernate.Impl.SessionImpl [(null)] <(null)> - Flushing entities and processing referenced collections
2007-07-02 15:12:23,734 [AdpaterExeMgrThread1] DEBUG NHibernate.Impl.AbstractVisitor [(null)] <(null)> - Processing collection for role RevenueRecognitionNamespace.Contract.RevenueRecognitions
2007-07-02 15:12:23,734 [AdpaterExeMgrThread1] DEBUG NHibernate.Impl.SessionImpl [(null)] <(null)> - Collection found: [RevenueRecognitionNamespace.Contract.RevenueRecognitions#bfdb095a110b4d40b7259a45c23ab1d9], was: [<unreferenced>]
2007-07-02 15:12:23,734 [AdpaterExeMgrThread1] DEBUG NHibernate.Impl.SessionImpl [(null)] <(null)> - Processing unreferenced collections
2007-07-02 15:12:23,734 [AdpaterExeMgrThread1] DEBUG NHibernate.Impl.SessionImpl [(null)] <(null)> - scheduling collection removes/(re)creates/updates
2007-07-02 15:12:23,734 [AdpaterExeMgrThread1] DEBUG NHibernate.Impl.SessionImpl [(null)] <(null)> - Flushed: 1 insertions, 0 updates, 0 deletions to 1 objects
2007-07-02 15:12:23,734 [AdpaterExeMgrThread1] DEBUG NHibernate.Impl.SessionImpl [(null)] <(null)> - Flushed: 1 (re)creations, 0 updates, 0 removals to 1 collections
2007-07-02 15:12:23,734 [AdpaterExeMgrThread1] DEBUG NHibernate.Impl.Printer [(null)] <(null)> - listing entities:
2007-07-02 15:12:23,750 [AdpaterExeMgrThread1] DEBUG NHibernate.Impl.Printer [(null)] <(null)> - RevenueRecognitionNamespace.Contract{Revenue=Money{Digits=2, CurrencySymbol=TRY, Cents=500}, Product=Product#281b4fcbac8a48eb90e300e8f81492ee, RevenueRecognitions=[RevenueRecognition{Amount=Money{Digits=2, CurrencySymbol=TRY, Cents=167}, Date=02.07.2007}, RevenueRecognition{Amount=Money{Digits=2, CurrencySymbol=TRY, Cents=167}, Date=01.08.2007}, RevenueRecognition{Amount=Money{Digits=2, CurrencySymbol=TRY, Cents=166}, Date=31.08.2007}], Id=bfdb095a110b4d40b7259a45c23ab1d9, WhenSigned=02.07.2007}
2007-07-02 15:12:23,750 [AdpaterExeMgrThread1] DEBUG NHibernate.Impl.SessionImpl [(null)] <(null)> - executing flush
2007-07-02 15:12:23,750 [AdpaterExeMgrThread1] DEBUG NHibernate.Impl.ConnectionManager [(null)] <(null)> - registering flush begin
2007-07-02 15:12:23,750 [AdpaterExeMgrThread1] DEBUG NHibernate.Persister.Entity.AbstractEntityPersister [(null)] <(null)> - Inserting entity: [RevenueRecognitionNamespace.Contract#bfdb095a110b4d40b7259a45c23ab1d9]
2007-07-02 15:12:23,750 [AdpaterExeMgrThread1] DEBUG NHibernate.Impl.BatcherImpl [(null)] <(null)> - Opened new IDbCommand, open IDbCommands: 1
2007-07-02 15:12:23,750 [AdpaterExeMgrThread1] DEBUG NHibernate.Impl.BatcherImpl [(null)] <(null)> - Building an IDbCommand object for the SqlString: INSERT INTO Contract (product_id, cents, currency, decimal_digits, when_signed, contract_id) VALUES (?, ?, ?, ?, ?, ?)
2007-07-02 15:12:23,750 [AdpaterExeMgrThread1] DEBUG NHibernate.Persister.Entity.AbstractEntityPersister [(null)] <(null)> - Dehydrating entity: [RevenueRecognitionNamespace.Contract#bfdb095a110b4d40b7259a45c23ab1d9]
2007-07-02 15:12:23,750 [AdpaterExeMgrThread1] DEBUG NHibernate.Engine.Cascades [(null)] <(null)> - unsaved-value:
2007-07-02 15:12:23,750 [AdpaterExeMgrThread1] DEBUG NHibernate.SQL [(null)] <(null)> - INSERT INTO Contract (product_id, cents, currency, decimal_digits, when_signed, contract_id) VALUES (@p0, @p1, @p2, @p3, @p4, @p5); @p0 = '281b4fcbac8a48eb90e300e8f81492ee', @p1 = '500', @p2 = 'TRY', @p3 = '2', @p4 = '02.07.2007 15:12:17', @p5 = 'bfdb095a110b4d40b7259a45c23ab1d9'
2007-07-02 15:12:23,765 [AdpaterExeMgrThread1] DEBUG NHibernate.Impl.BatcherImpl [(null)] <(null)> - Closed IDbCommand, open IDbCommands: 0
2007-07-02 15:12:23,765 [AdpaterExeMgrThread1] DEBUG NHibernate.Persister.Collection.ICollectionPersister [(null)] <(null)> - Inserting collection: [RevenueRecognitionNamespace.Contract.RevenueRecognitions#bfdb095a110b4d40b7259a45c23ab1d9]
2007-07-02 15:12:23,765 [AdpaterExeMgrThread1] DEBUG NHibernate.Impl.BatcherImpl [(null)] <(null)> - Opened new IDbCommand, open IDbCommands: 1
2007-07-02 15:12:23,765 [AdpaterExeMgrThread1] DEBUG NHibernate.Impl.BatcherImpl [(null)] <(null)> - Building an IDbCommand object for the SqlString: INSERT INTO RevenueRecognitions (contract_id, list_index, cents, currency, decimal_digits, date) VALUES (?, ?, ?, ?, ?, ?)
2007-07-02 15:12:23,765 [AdpaterExeMgrThread1] DEBUG NHibernate.SQL [(null)] <(null)> - INSERT INTO RevenueRecognitions (contract_id, list_index, cents, currency, decimal_digits, date) VALUES (@p0, @p1, @p2, @p3, @p4, @p5); @p0 = 'bfdb095a110b4d40b7259a45c23ab1d9', @p1 = '0', @p2 = '167', @p3 = 'TRY', @p4 = '2', @p5 = '02.07.2007 15:12:17'
2007-07-02 15:12:23,765 [AdpaterExeMgrThread1] DEBUG NHibernate.SQL [(null)] <(null)> - INSERT INTO RevenueRecognitions (contract_id, list_index, cents, currency, decimal_digits, date) VALUES (@p0, @p1, @p2, @p3, @p4, @p5); @p0 = 'bfdb095a110b4d40b7259a45c23ab1d9', @p1 = '1', @p2 = '167', @p3 = 'TRY', @p4 = '2', @p5 = '01.08.2007 15:12:17'
2007-07-02 15:12:23,781 [AdpaterExeMgrThread1] DEBUG NHibernate.SQL [(null)] <(null)> - INSERT INTO RevenueRecognitions (contract_id, list_index, cents, currency, decimal_digits, date) VALUES (@p0, @p1, @p2, @p3, @p4, @p5); @p0 = 'bfdb095a110b4d40b7259a45c23ab1d9', @p1 = '2', @p2 = '166', @p3 = 'TRY', @p4 = '2', @p5 = '31.08.2007 15:12:17'
2007-07-02 15:12:23,781 [AdpaterExeMgrThread1] DEBUG NHibernate.Persister.Collection.ICollectionPersister [(null)] <(null)> - done inserting collection: 3 rows inserted
2007-07-02 15:12:23,781 [AdpaterExeMgrThread1] DEBUG NHibernate.Impl.BatcherImpl [(null)] <(null)> - Closed IDbCommand, open IDbCommands: 0
2007-07-02 15:12:23,781 [AdpaterExeMgrThread1] DEBUG NHibernate.Impl.ConnectionManager [(null)] <(null)> - registering flush end
2007-07-02 15:12:23,781 [AdpaterExeMgrThread1] DEBUG NHibernate.Impl.SessionImpl [(null)] <(null)> - post flush
2007-07-02 15:12:23,781 [AdpaterExeMgrThread1] DEBUG NHibernate.Impl.SessionImpl [(null)] <(null)> - before transaction completion
2007-07-02 15:12:23,781 [AdpaterExeMgrThread1] DEBUG NHibernate.Impl.ConnectionManager [(null)] <(null)> - aggressively releasing database connection
2007-07-02 15:12:23,781 [AdpaterExeMgrThread1] DEBUG NHibernate.Connection.ConnectionProvider [(null)] <(null)> - Closing connection
2007-07-02 15:12:23,781 [AdpaterExeMgrThread1] DEBUG NHibernate.Impl.SessionImpl [(null)] <(null)> - transaction completion
2007-07-02 15:12:23,781 [AdpaterExeMgrThread1] DEBUG NHibernate.Cache.UpdateTimestampsCache [(null)] <(null)> - Invalidating space [Contract]
2007-07-02 15:12:23,781 [AdpaterExeMgrThread1] DEBUG NHibernate.Cache.UpdateTimestampsCache [(null)] <(null)> - Invalidating space [RevenueRecognitions]
2007-07-02 15:12:23,781 [AdpaterExeMgrThread1] DEBUG NHibernate.Transaction.AdoTransaction [(null)] <(null)> - running AdoTransaction.Dispose()
2007-07-02 15:12:23,781 [AdpaterExeMgrThread1] DEBUG NHibernate.Impl.SessionImpl [(null)] <(null)> - closing session
2007-07-02 15:12:27,421 [AdpaterExeMgrThread1] DEBUG NHibernate.Cfg.Configuration [(null)] <(null)> - dialect=NHibernate.Dialect.MsSql2000Dialect
2007-07-02 15:12:27,421 [AdpaterExeMgrThread1] DEBUG NHibernate.Cfg.Configuration [(null)] <(null)> - connection.provider=NHibernate.Connection.DriverConnectionProvider
2007-07-02 15:12:27,421 [AdpaterExeMgrThread1] DEBUG NHibernate.Cfg.Configuration [(null)] <(null)> - connection.connection_string=Data Source=BAHADIRKN;Initial Catalog=RevenueRecognition;User ID=sa;Password=1
2007-07-02 15:12:27,421 [AdpaterExeMgrThread1] DEBUG NHibernate.Cfg.Configuration [(null)] <(null)> - <-RevenueRecognition.Domain
2007-07-02 15:12:27,421 [AdpaterExeMgrThread1] INFO NHibernate.Cfg.Configuration [(null)] <(null)> - Searching for mapped documents in assembly: RevenueRecognition.Domain
2007-07-02 15:12:27,421 [AdpaterExeMgrThread1] INFO NHibernate.Cfg.Configuration [(null)] <(null)> - Found mapping document in assembly: RevenueRecognition.Domain.RevenueRecognition.Contract.hbm.xml
2007-07-02 15:12:27,421 [AdpaterExeMgrThread1] INFO NHibernate.Cfg.Configuration [(null)] <(null)> - Mapping resource: RevenueRecognition.Domain.RevenueRecognition.Contract.hbm.xml
2007-07-02 15:12:27,453 [AdpaterExeMgrThread1] INFO NHibernate.Dialect.Dialect [(null)] <(null)> - Using dialect: NHibernate.Dialect.MsSql2000Dialect
2007-07-02 15:12:27,453 [AdpaterExeMgrThread1] INFO NHibernate.Cfg.HbmBinder [(null)] <(null)> - Mapping class: RevenueRecognitionNamespace.Contract -> Contract
2007-07-02 15:12:27,453 [AdpaterExeMgrThread1] DEBUG NHibernate.Cfg.HbmBinder [(null)] <(null)> - Mapped property: Id -> contract_id, type: String
2007-07-02 15:12:27,453 [AdpaterExeMgrThread1] DEBUG NHibernate.Cfg.HbmBinder [(null)] <(null)> - Mapped property: Product -> product_id, type: Product
2007-07-02 15:12:27,453 [AdpaterExeMgrThread1] DEBUG NHibernate.Cfg.HbmBinder [(null)] <(null)> - Mapped property: Cents -> cents, type: Int64
2007-07-02 15:12:27,453 [AdpaterExeMgrThread1] DEBUG NHibernate.Cfg.HbmBinder [(null)] <(null)> - Mapped property: CurrencySymbol -> currency, type: String
2007-07-02 15:12:27,453 [AdpaterExeMgrThread1] DEBUG NHibernate.Cfg.HbmBinder [(null)] <(null)> - Mapped property: Digits -> decimal_digits, type: Int32
2007-07-02 15:12:27,453 [AdpaterExeMgrThread1] DEBUG NHibernate.Cfg.HbmBinder [(null)] <(null)> - Mapped property: Revenue -> cents, currency, decimal_digits, type: Money
2007-07-02 15:12:27,453 [AdpaterExeMgrThread1] DEBUG NHibernate.Cfg.HbmBinder [(null)] <(null)> - Mapped property: WhenSigned -> when_signed, type: DateTime
2007-07-02 15:12:27,453 [AdpaterExeMgrThread1] INFO NHibernate.Cfg.HbmBinder [(null)] <(null)> - Mapping collection: RevenueRecognitionNamespace.Contract.RevenueRecognitions -> RevenueRecognitions
2007-07-02 15:12:27,453 [AdpaterExeMgrThread1] DEBUG NHibernate.Cfg.HbmBinder [(null)] <(null)> - Mapped property: RevenueRecognitions, type: IList
2007-07-02 15:12:27,453 [AdpaterExeMgrThread1] INFO NHibernate.Cfg.Configuration [(null)] <(null)> - Found mapping document in assembly: RevenueRecognition.Domain.RevenueRecognition.Product.hbm.xml
2007-07-02 15:12:27,453 [AdpaterExeMgrThread1] INFO NHibernate.Cfg.Configuration [(null)] <(null)> - Mapping resource: RevenueRecognition.Domain.RevenueRecognition.Product.hbm.xml
2007-07-02 15:12:27,453 [AdpaterExeMgrThread1] INFO NHibernate.Dialect.Dialect [(null)] <(null)> - Using dialect: NHibernate.Dialect.MsSql2000Dialect
2007-07-02 15:12:27,453 [AdpaterExeMgrThread1] INFO NHibernate.Cfg.HbmBinder [(null)] <(null)> - Mapping class: RevenueRecognitionNamespace.Product -> Product
2007-07-02 15:12:27,453 [AdpaterExeMgrThread1] DEBUG NHibernate.Cfg.HbmBinder [(null)] <(null)> - Mapped property: Id -> product_id, type: String
2007-07-02 15:12:27,453 [AdpaterExeMgrThread1] DEBUG NHibernate.Cfg.HbmBinder [(null)] <(null)> - Mapped property: Name -> name, type: String
2007-07-02 15:12:27,453 [AdpaterExeMgrThread1] DEBUG NHibernate.Cfg.Configuration [(null)] <(null)> - properties: System.Collections.Hashtable
2007-07-02 15:12:27,453 [AdpaterExeMgrThread1] INFO NHibernate.Cfg.Configuration [(null)] <(null)> - processing one-to-many association mappings
2007-07-02 15:12:27,453 [AdpaterExeMgrThread1] DEBUG NHibernate.Cfg.CollectionSecondPass [(null)] <(null)> - Second pass for collection: RevenueRecognitionNamespace.Contract.RevenueRecognitions
2007-07-02 15:12:27,453 [AdpaterExeMgrThread1] DEBUG NHibernate.Cfg.HbmBinder [(null)] <(null)> - Mapped property: Cents -> cents, type: Int64
2007-07-02 15:12:27,453 [AdpaterExeMgrThread1] DEBUG NHibernate.Cfg.HbmBinder [(null)] <(null)> - Mapped property: CurrencySymbol -> currency, type: String
2007-07-02 15:12:27,453 [AdpaterExeMgrThread1] DEBUG NHibernate.Cfg.HbmBinder [(null)] <(null)> - Mapped property: Digits -> decimal_digits, type: Int32
2007-07-02 15:12:27,453 [AdpaterExeMgrThread1] DEBUG NHibernate.Cfg.HbmBinder [(null)] <(null)> - Mapped property: Amount -> cents, currency, decimal_digits, type: Money
2007-07-02 15:12:27,453 [AdpaterExeMgrThread1] DEBUG NHibernate.Cfg.HbmBinder [(null)] <(null)> - Mapped property: Date -> date, type: DateTime
2007-07-02 15:12:27,453 [AdpaterExeMgrThread1] DEBUG NHibernate.Cfg.CollectionSecondPass [(null)] <(null)> - Mapped collection key: contract_id, index: list_index, element: cents, currency, decimal_digits, date, type: RevenueRecognition
2007-07-02 15:12:27,453 [AdpaterExeMgrThread1] INFO NHibernate.Cfg.Configuration [(null)] <(null)> - processing one-to-one association property references
2007-07-02 15:12:27,453 [AdpaterExeMgrThread1] INFO NHibernate.Cfg.Configuration [(null)] <(null)> - processing foreign key constraints
2007-07-02 15:12:27,453 [AdpaterExeMgrThread1] DEBUG NHibernate.Cfg.Configuration [(null)] <(null)> - resolving reference to class: Contract
2007-07-02 15:12:27,453 [AdpaterExeMgrThread1] DEBUG NHibernate.Cfg.Configuration [(null)] <(null)> - resolving reference to class: Product
2007-07-02 15:12:27,453 [AdpaterExeMgrThread1] INFO NHibernate.Dialect.Dialect [(null)] <(null)> - Using dialect: NHibernate.Dialect.MsSql2000Dialect
2007-07-02 15:12:27,453 [AdpaterExeMgrThread1] INFO NHibernate.Connection.ConnectionProviderFactory [(null)] <(null)> - Initializing connection provider: NHibernate.Connection.DriverConnectionProvider
2007-07-02 15:12:27,453 [AdpaterExeMgrThread1] INFO NHibernate.Connection.ConnectionProvider [(null)] <(null)> - Configuring ConnectionProvider
2007-07-02 15:12:27,453 [AdpaterExeMgrThread1] INFO NHibernate.Cfg.SettingsFactory [(null)] <(null)> - Optimize cache for minimal puts: False
2007-07-02 15:12:27,453 [AdpaterExeMgrThread1] INFO NHibernate.Cfg.SettingsFactory [(null)] <(null)> - Connection release mode: auto
2007-07-02 15:12:27,453 [AdpaterExeMgrThread1] INFO NHibernate.Cfg.SettingsFactory [(null)] <(null)> - Query translator: NHibernate.Hql.Classic.ClassicQueryTranslatorFactory
2007-07-02 15:12:27,453 [AdpaterExeMgrThread1] INFO NHibernate.Cfg.SettingsFactory [(null)] <(null)> - Query language substitutions: {false=0, no='N', yes='Y', true=1}
2007-07-02 15:12:27,453 [AdpaterExeMgrThread1] INFO NHibernate.Cfg.SettingsFactory [(null)] <(null)> - cache provider: NHibernate.Cache.HashtableCacheProvider, NHibernate
2007-07-02 15:12:27,453 [AdpaterExeMgrThread1] INFO NHibernate.Cfg.SettingsFactory [(null)] <(null)> - query cache factory: NHibernate.Cache.StandardQueryCacheFactory
2007-07-02 15:12:27,453 [AdpaterExeMgrThread1] INFO NHibernate.Cfg.SettingsFactory [(null)] <(null)> - Using Isolation Level: ReadCommitted
2007-07-02 15:12:27,453 [AdpaterExeMgrThread1] INFO NHibernate.Impl.SessionFactoryImpl [(null)] <(null)> - building session factory
2007-07-02 15:12:27,453 [AdpaterExeMgrThread1] DEBUG NHibernate.Impl.SessionFactoryImpl [(null)] <(null)> - instantiating session factory with properties: {hibernate.connection.driver_class=NHibernate.Driver.SqlClientDriver, hibernate.use_reflection_optimizer=true, hibernate.connection.connection_string=Data Source=BAHADIRKN;Initial Catalog=RevenueRecognition;User ID=sa;Password=1, hibernate.prepare_sql=false, hibernate.connection.provider=NHibernate.Connection.DriverConnectionProvider, hibernate.query.substitutions=true 1, false 0, yes 'Y', no 'N', hibernate.adonet.batch_size=10, connection.connection_string=Data Source=BAHADIRKN;Initial Catalog=RevenueRecognition;User ID=sa;Password=1, hibernate.cache.provider_class=NHibernate.Cache.HashtableCacheProvider, NHibernate, hibernate.cache.use_query_cache=true, dialect=NHibernate.Dialect.MsSql2000Dialect, hibernate.bytecode.provider=lcg, hibernate.dialect=NHibernate.Dialect.MsSql2000Dialect, connection.provider=NHibernate.Connection.DriverConnectionProvider, hibernate.connection.isolation=ReadCommitted}
2007-07-02 15:12:27,453 [AdpaterExeMgrThread1] DEBUG NHibernate.Impl.SessionFactoryObjectFactory [(null)] <(null)> - registered: f7de74bb5da547f282f5a7b588d18d0f(unnamed)
2007-07-02 15:12:27,468 [AdpaterExeMgrThread1] INFO NHibernate.Impl.SessionFactoryObjectFactory [(null)] <(null)> - no name configured
2007-07-02 15:12:27,468 [AdpaterExeMgrThread1] DEBUG NHibernate.Loader.Entity.AbstractEntityLoader [(null)] <(null)> - Static select for entity RevenueRecognitionNamespace.Contract: SELECT contract0_.contract_id as contract1_3_1_, contract0_.product_id as product2_3_1_, contract0_.cents as cents3_1_, contract0_.currency as currency3_1_, contract0_.decimal_digits as decimal5_3_1_, contract0_.when_signed as when6_3_1_, product1_.product_id as product1_5_0_, product1_.name as name5_0_ FROM Contract contract0_ left outer join Product product1_ on contract0_.product_id=product1_.product_id WHERE contract0_.contract_id=?
2007-07-02 15:12:27,468 [AdpaterExeMgrThread1] DEBUG NHibernate.Loader.Entity.AbstractEntityLoader [(null)] <(null)> - Static select for entity RevenueRecognitionNamespace.Contract: SELECT contract0_.contract_id as contract1_3_1_, contract0_.product_id as product2_3_1_, contract0_.cents as cents3_1_, contract0_.currency as currency3_1_, contract0_.decimal_digits as decimal5_3_1_, contract0_.when_signed as when6_3_1_, product1_.product_id as product1_5_0_, product1_.name as name5_0_ FROM Contract contract0_ left outer join Product product1_ on contract0_.product_id=product1_.product_id WHERE contract0_.contract_id=?
2007-07-02 15:12:27,468 [AdpaterExeMgrThread1] DEBUG NHibernate.Loader.Entity.AbstractEntityLoader [(null)] <(null)> - Static select for entity RevenueRecognitionNamespace.Contract: SELECT contract0_.contract_id as contract1_3_0_, contract0_.product_id as product2_3_0_, contract0_.cents as cents3_0_, contract0_.currency as currency3_0_, contract0_.decimal_digits as decimal5_3_0_, contract0_.when_signed as when6_3_0_ FROM Contract contract0_ WHERE contract0_.contract_id=?
2007-07-02 15:12:27,468 [AdpaterExeMgrThread1] DEBUG NHibernate.Loader.Entity.AbstractEntityLoader [(null)] <(null)> - Static select for entity RevenueRecognitionNamespace.Contract: SELECT contract0_.contract_id as contract1_3_0_, contract0_.product_id as product2_3_0_, contract0_.cents as cents3_0_, contract0_.currency as currency3_0_, contract0_.decimal_digits as decimal5_3_0_, contract0_.when_signed as when6_3_0_ FROM Contract contract0_ WHERE contract0_.contract_id=?
2007-07-02 15:12:27,468 [AdpaterExeMgrThread1] DEBUG NHibernate.Loader.Entity.AbstractEntityLoader [(null)] <(null)> - Static select for entity RevenueRecognitionNamespace.Product: SELECT product0_.product_id as product1_5_0_, product0_.name as name5_0_ FROM Product product0_ WHERE product0_.product_id=?
2007-07-02 15:12:27,468 [AdpaterExeMgrThread1] DEBUG NHibernate.Loader.Entity.AbstractEntityLoader [(null)] <(null)> - Static select for entity RevenueRecognitionNamespace.Product: SELECT product0_.product_id as product1_5_0_, product0_.name as name5_0_ FROM Product product0_ WHERE product0_.product_id=?
2007-07-02 15:12:27,468 [AdpaterExeMgrThread1] DEBUG NHibernate.Loader.Entity.AbstractEntityLoader [(null)] <(null)> - Static select for entity RevenueRecognitionNamespace.Product: SELECT product0_.product_id as product1_5_0_, product0_.name as name5_0_ FROM Product product0_ WHERE product0_.product_id=?
2007-07-02 15:12:27,468 [AdpaterExeMgrThread1] DEBUG NHibernate.Loader.Entity.AbstractEntityLoader [(null)] <(null)> - Static select for entity RevenueRecognitionNamespace.Product: SELECT product0_.product_id as product1_5_0_, product0_.name as name5_0_ FROM Product product0_ WHERE product0_.product_id=?
2007-07-02 15:12:27,468 [AdpaterExeMgrThread1] DEBUG NHibernate.Loader.Collection.BasicCollectionLoader [(null)] <(null)> - Static select for collection RevenueRecognitionNamespace.Contract.RevenueRecognitions: SELECT revenuerec0_.contract_id as contract1___0_, revenuerec0_.cents as cents0_, revenuerec0_.currency as currency0_, revenuerec0_.decimal_digits as decimal4_0_, revenuerec0_.date as date0_, revenuerec0_.list_index as list6___0_ FROM RevenueRecognitions revenuerec0_ WHERE revenuerec0_.contract_id=?
2007-07-02 15:12:27,468 [AdpaterExeMgrThread1] DEBUG NHibernate.Impl.SessionFactoryImpl [(null)] <(null)> - Instantiated session factory
2007-07-02 15:12:27,468 [AdpaterExeMgrThread1] INFO NHibernate.Cache.UpdateTimestampsCache [(null)] <(null)> - starting update timestamps cache at region: UpdateTimestampsCache
2007-07-02 15:12:27,468 [AdpaterExeMgrThread1] INFO NHibernate.Cache.StandardQueryCache [(null)] <(null)> - starting query cache at region: NHibernate.Cache.StandardQueryCache
2007-07-02 15:12:27,468 [AdpaterExeMgrThread1] DEBUG NHibernate.Impl.SessionImpl [(null)] <(null)> - opened session
2007-07-02 15:12:27,468 [AdpaterExeMgrThread1] DEBUG NHibernate.Impl.SessionImpl [(null)] <(null)> - loading [Contract#bfdb095a110b4d40b7259a45c23ab1d9]
2007-07-02 15:12:27,468 [AdpaterExeMgrThread1] DEBUG NHibernate.Impl.SessionImpl [(null)] <(null)> - attempting to resolve [Contract#bfdb095a110b4d40b7259a45c23ab1d9]
2007-07-02 15:12:27,468 [AdpaterExeMgrThread1] DEBUG NHibernate.Impl.SessionImpl [(null)] <(null)> - object not resolved in any cache [RevenueRecognitionNamespace.Contract#bfdb095a110b4d40b7259a45c23ab1d9]
2007-07-02 15:12:27,468 [AdpaterExeMgrThread1] DEBUG NHibernate.Persister.Entity.AbstractEntityPersister [(null)] <(null)> - Fetching entity: [RevenueRecognitionNamespace.Contract#bfdb095a110b4d40b7259a45c23ab1d9]
2007-07-02 15:12:27,468 [AdpaterExeMgrThread1] DEBUG NHibernate.Loader.Loader [(null)] <(null)> - loading entity: [RevenueRecognitionNamespace.Contract#bfdb095a110b4d40b7259a45c23ab1d9]
2007-07-02 15:12:27,484 [AdpaterExeMgrThread1] DEBUG NHibernate.Impl.BatcherImpl [(null)] <(null)> - Opened new IDbCommand, open IDbCommands: 1
2007-07-02 15:12:27,484 [AdpaterExeMgrThread1] DEBUG NHibernate.Impl.BatcherImpl [(null)] <(null)> - Building an IDbCommand object for the SqlString: SELECT contract0_.contract_id as contract1_3_1_, contract0_.product_id as product2_3_1_, contract0_.cents as cents3_1_, contract0_.currency as currency3_1_, contract0_.decimal_digits as decimal5_3_1_, contract0_.when_signed as when6_3_1_, product1_.product_id as product1_5_0_, product1_.name as name5_0_ FROM Contract contract0_ left outer join Product product1_ on contract0_.product_id=product1_.product_id WHERE contract0_.contract_id=?
2007-07-02 15:12:27,484 [AdpaterExeMgrThread1] INFO NHibernate.Loader.Loader [(null)] <(null)> - SELECT contract0_.contract_id as contract1_3_1_, contract0_.product_id as product2_3_1_, contract0_.cents as cents3_1_, contract0_.currency as currency3_1_, contract0_.decimal_digits as decimal5_3_1_, contract0_.when_signed as when6_3_1_, product1_.product_id as product1_5_0_, product1_.name as name5_0_ FROM Contract contract0_ left outer join Product product1_ on contract0_.product_id=product1_.product_id WHERE contract0_.contract_id=@p0
2007-07-02 15:12:27,484 [AdpaterExeMgrThread1] DEBUG NHibernate.SQL [(null)] <(null)> - SELECT contract0_.contract_id as contract1_3_1_, contract0_.product_id as product2_3_1_, contract0_.cents as cents3_1_, contract0_.currency as currency3_1_, contract0_.decimal_digits as decimal5_3_1_, contract0_.when_signed as when6_3_1_, product1_.product_id as product1_5_0_, product1_.name as name5_0_ FROM Contract contract0_ left outer join Product product1_ on contract0_.product_id=product1_.product_id WHERE contract0_.contract_id=@p0; @p0 = 'bfdb095a110b4d40b7259a45c23ab1d9'
2007-07-02 15:12:27,484 [AdpaterExeMgrThread1] DEBUG NHibernate.Connection.DriverConnectionProvider [(null)] <(null)> - Obtaining IDbConnection from Driver
2007-07-02 15:12:27,546 [AdpaterExeMgrThread1] DEBUG NHibernate.Impl.BatcherImpl [(null)] <(null)> - Opened IDataReader, open IDataReaders: 1
2007-07-02 15:12:27,562 [AdpaterExeMgrThread1] DEBUG NHibernate.Loader.Loader [(null)] <(null)> - processing result set
2007-07-02 15:12:27,562 [AdpaterExeMgrThread1] DEBUG NHibernate.Loader.Loader [(null)] <(null)> - result set row: 0
2007-07-02 15:12:27,578 [AdpaterExeMgrThread1] DEBUG NHibernate.Loader.Loader [(null)] <(null)> - result row: 281b4fcbac8a48eb90e300e8f81492ee , bfdb095a110b4d40b7259a45c23ab1d9
2007-07-02 15:12:27,578 [AdpaterExeMgrThread1] DEBUG NHibernate.Loader.Loader [(null)] <(null)> - Initializing object from DataReader: [RevenueRecognitionNamespace.Product#281b4fcbac8a48eb90e300e8f81492ee ]
2007-07-02 15:12:27,578 [AdpaterExeMgrThread1] DEBUG NHibernate.Loader.Loader [(null)] <(null)> - Hydrating entity: RevenueRecognitionNamespace.Product#281b4fcbac8a48eb90e300e8f81492ee
2007-07-02 15:12:27,578 [AdpaterExeMgrThread1] DEBUG NHibernate.Loader.Loader [(null)] <(null)> - Initializing object from DataReader: [RevenueRecognitionNamespace.Contract#bfdb095a110b4d40b7259a45c23ab1d9]
2007-07-02 15:12:27,578 [AdpaterExeMgrThread1] DEBUG NHibernate.Loader.Loader [(null)] <(null)> - Hydrating entity: RevenueRecognitionNamespace.Contract#bfdb095a110b4d40b7259a45c23ab1d9
2007-07-02 15:12:27,593 [AdpaterExeMgrThread1] DEBUG NHibernate.Loader.Loader [(null)] <(null)> - done processing result set (1 rows)
2007-07-02 15:12:27,593 [AdpaterExeMgrThread1] DEBUG NHibernate.Driver.NHybridDataReader [(null)] <(null)> - running NHybridDataReader.Dispose()
2007-07-02 15:12:27,593 [AdpaterExeMgrThread1] DEBUG NHibernate.Impl.BatcherImpl [(null)] <(null)> - Closed IDataReader, open IDataReaders :0
2007-07-02 15:12:27,593 [AdpaterExeMgrThread1] DEBUG NHibernate.Impl.BatcherImpl [(null)] <(null)> - Closed IDbCommand, open IDbCommands: 0
2007-07-02 15:12:27,593 [AdpaterExeMgrThread1] DEBUG NHibernate.Impl.ConnectionManager [(null)] <(null)> - aggressively releasing database connection
2007-07-02 15:12:27,593 [AdpaterExeMgrThread1] DEBUG NHibernate.Connection.ConnectionProvider [(null)] <(null)> - Closing connection
2007-07-02 15:12:27,593 [AdpaterExeMgrThread1] DEBUG NHibernate.Loader.Loader [(null)] <(null)> - total objects hydrated: 2
2007-07-02 15:12:27,593 [AdpaterExeMgrThread1] DEBUG NHibernate.Impl.SessionImpl [(null)] <(null)> - resolving associations for: [RevenueRecognitionNamespace.Product#281b4fcbac8a48eb90e300e8f81492ee ]
2007-07-02 15:12:27,593 [AdpaterExeMgrThread1] DEBUG NHibernate.Impl.SessionImpl [(null)] <(null)> - done materializing entity [RevenueRecognitionNamespace.Product#281b4fcbac8a48eb90e300e8f81492ee ]
2007-07-02 15:12:27,593 [AdpaterExeMgrThread1] DEBUG NHibernate.Impl.SessionImpl [(null)] <(null)> - resolving associations for: [RevenueRecognitionNamespace.Contract#bfdb095a110b4d40b7259a45c23ab1d9]
2007-07-02 15:12:27,593 [AdpaterExeMgrThread1] DEBUG NHibernate.Impl.SessionImpl [(null)] <(null)> - loading [Product#281b4fcbac8a48eb90e300e8f81492ee ]
2007-07-02 15:12:27,593 [AdpaterExeMgrThread1] DEBUG NHibernate.Impl.SessionImpl [(null)] <(null)> - attempting to resolve [Product#281b4fcbac8a48eb90e300e8f81492ee ]
2007-07-02 15:12:27,593 [AdpaterExeMgrThread1] DEBUG NHibernate.Impl.SessionImpl [(null)] <(null)> - resolved object in session cache [RevenueRecognitionNamespace.Product#281b4fcbac8a48eb90e300e8f81492ee ]
2007-07-02 15:12:27,593 [AdpaterExeMgrThread1] DEBUG NHibernate.Impl.SessionImpl [(null)] <(null)> - creating collection wrapper:[RevenueRecognitionNamespace.Contract.RevenueRecognitions#bfdb095a110b4d40b7259a45c23ab1d9]
2007-07-02 15:12:27,609 [AdpaterExeMgrThread1] DEBUG NHibernate.Impl.SessionImpl [(null)] <(null)> - done materializing entity [RevenueRecognitionNamespace.Contract#bfdb095a110b4d40b7259a45c23ab1d9]
2007-07-02 15:12:27,609 [AdpaterExeMgrThread1] DEBUG NHibernate.Impl.SessionImpl [(null)] <(null)> - initializing non-lazy collections
2007-07-02 15:12:27,609 [AdpaterExeMgrThread1] DEBUG NHibernate.Impl.SessionImpl [(null)] <(null)> - initializing collection [RevenueRecognitionNamespace.Contract.RevenueRecognitions#bfdb095a110b4d40b7259a45c23ab1d9]
2007-07-02 15:12:27,609 [AdpaterExeMgrThread1] DEBUG NHibernate.Impl.SessionImpl [(null)] <(null)> - checking second-level cache
2007-07-02 15:12:27,609 [AdpaterExeMgrThread1] DEBUG NHibernate.Impl.SessionImpl [(null)] <(null)> - collection not cached
2007-07-02 15:12:27,609 [AdpaterExeMgrThread1] DEBUG NHibernate.Loader.Loader [(null)] <(null)> - loading collection: [RevenueRecognitionNamespace.Contract.RevenueRecognitions#bfdb095a110b4d40b7259a45c23ab1d9]
2007-07-02 15:12:27,609 [AdpaterExeMgrThread1] DEBUG NHibernate.Impl.BatcherImpl [(null)] <(null)> - Opened new IDbCommand, open IDbCommands: 1
2007-07-02 15:12:27,609 [AdpaterExeMgrThread1] DEBUG NHibernate.Impl.BatcherImpl [(null)] <(null)> - Building an IDbCommand object for the SqlString: SELECT revenuerec0_.contract_id as contract1___0_, revenuerec0_.cents as cents0_, revenuerec0_.currency as currency0_, revenuerec0_.decimal_digits as decimal4_0_, revenuerec0_.date as date0_, revenuerec0_.list_index as list6___0_ FROM RevenueRecognitions revenuerec0_ WHERE revenuerec0_.contract_id=?
2007-07-02 15:12:27,609 [AdpaterExeMgrThread1] INFO NHibernate.Loader.Loader [(null)] <(null)> - SELECT revenuerec0_.contract_id as contract1___0_, revenuerec0_.cents as cents0_, revenuerec0_.currency as currency0_, revenuerec0_.decimal_digits as decimal4_0_, revenuerec0_.date as date0_, revenuerec0_.list_index as list6___0_ FROM RevenueRecognitions revenuerec0_ WHERE revenuerec0_.contract_id=@p0
2007-07-02 15:12:27,609 [AdpaterExeMgrThread1] DEBUG NHibernate.SQL [(null)] <(null)> - SELECT revenuerec0_.contract_id as contract1___0_, revenuerec0_.cents as cents0_, revenuerec0_.currency as currency0_, revenuerec0_.decimal_digits as decimal4_0_, revenuerec0_.date as date0_, revenuerec0_.list_index as list6___0_ FROM RevenueRecognitions revenuerec0_ WHERE revenuerec0_.contract_id=@p0; @p0 = 'bfdb095a110b4d40b7259a45c23ab1d9'
2007-07-02 15:12:27,609 [AdpaterExeMgrThread1] DEBUG NHibernate.Connection.DriverConnectionProvider [(null)] <(null)> - Obtaining IDbConnection from Driver
2007-07-02 15:12:27,609 [AdpaterExeMgrThread1] DEBUG NHibernate.Impl.BatcherImpl [(null)] <(null)> - Opened IDataReader, open IDataReaders: 1
2007-07-02 15:12:27,609 [AdpaterExeMgrThread1] DEBUG NHibernate.Loader.Loader [(null)] <(null)> - result set contains (possibly empty) collection: [RevenueRecognitionNamespace.Contract.RevenueRecognitions#bfdb095a110b4d40b7259a45c23ab1d9]
2007-07-02 15:12:27,609 [AdpaterExeMgrThread1] DEBUG NHibernate.Impl.SessionImpl [(null)] <(null)> - uninitialized collection: initializing
2007-07-02 15:12:27,625 [AdpaterExeMgrThread1] DEBUG NHibernate.Loader.Loader [(null)] <(null)> - processing result set
2007-07-02 15:12:27,625 [AdpaterExeMgrThread1] DEBUG NHibernate.Loader.Loader [(null)] <(null)> - result set row: 0
2007-07-02 15:12:27,625 [AdpaterExeMgrThread1] DEBUG NHibernate.Loader.Loader [(null)] <(null)> - result row:
2007-07-02 15:12:27,625 [AdpaterExeMgrThread1] DEBUG NHibernate.Loader.Loader [(null)] <(null)> - found row of collection: [RevenueRecognitionNamespace.Contract.RevenueRecognitions#bfdb095a110b4d40b7259a45c23ab1d9 ]
2007-07-02 15:12:27,625 [AdpaterExeMgrThread1] DEBUG NHibernate.Impl.SessionImpl [(null)] <(null)> - new collection: instantiating
2007-07-02 15:12:27,625 [AdpaterExeMgrThread1] DEBUG NHibernate.Loader.Loader [(null)] <(null)> - result set row: 1
2007-07-02 15:12:27,625 [AdpaterExeMgrThread1] DEBUG NHibernate.Loader.Loader [(null)] <(null)> - result row:
2007-07-02 15:12:27,625 [AdpaterExeMgrThread1] DEBUG NHibernate.Loader.Loader [(null)] <(null)> - found row of collection: [RevenueRecognitionNamespace.Contract.RevenueRecognitions#bfdb095a110b4d40b7259a45c23ab1d9 ]
2007-07-02 15:12:27,625 [AdpaterExeMgrThread1] DEBUG NHibernate.Impl.SessionImpl [(null)] <(null)> - reading row
2007-07-02 15:12:27,625 [AdpaterExeMgrThread1] DEBUG NHibernate.Loader.Loader [(null)] <(null)> - result set row: 2
2007-07-02 15:12:27,625 [AdpaterExeMgrThread1] DEBUG NHibernate.Loader.Loader [(null)] <(null)> - result row:
2007-07-02 15:12:27,625 [AdpaterExeMgrThread1] DEBUG NHibernate.Loader.Loader [(null)] <(null)> - found row of collection: [RevenueRecognitionNamespace.Contract.RevenueRecognitions#bfdb095a110b4d40b7259a45c23ab1d9 ]
2007-07-02 15:12:27,625 [AdpaterExeMgrThread1] DEBUG NHibernate.Impl.SessionImpl [(null)] <(null)> - reading row
2007-07-02 15:12:27,625 [AdpaterExeMgrThread1] DEBUG NHibernate.Loader.Loader [(null)] <(null)> - done processing result set (3 rows)
2007-07-02 15:12:27,625 [AdpaterExeMgrThread1] DEBUG NHibernate.Driver.NHybridDataReader [(null)] <(null)> - running NHybridDataReader.Dispose()
2007-07-02 15:12:27,625 [AdpaterExeMgrThread1] DEBUG NHibernate.Impl.BatcherImpl [(null)] <(null)> - Closed IDataReader, open IDataReaders :0
2007-07-02 15:12:27,625 [AdpaterExeMgrThread1] DEBUG NHibernate.Impl.BatcherImpl [(null)] <(null)> - Closed IDbCommand, open IDbCommands: 0
2007-07-02 15:12:27,625 [AdpaterExeMgrThread1] DEBUG NHibernate.Impl.ConnectionManager [(null)] <(null)> - aggressively releasing database connection
2007-07-02 15:12:27,625 [AdpaterExeMgrThread1] DEBUG NHibernate.Connection.ConnectionProvider [(null)] <(null)> - Closing connection
2007-07-02 15:12:27,625 [AdpaterExeMgrThread1] DEBUG NHibernate.Impl.SessionImpl [(null)] <(null)> - 2 collections were found in result set
2007-07-02 15:12:27,625 [AdpaterExeMgrThread1] DEBUG NHibernate.Impl.SessionImpl [(null)] <(null)> - collection fully initialized: [RevenueRecognitionNamespace.Contract.RevenueRecognitions#bfdb095a110b4d40b7259a45c23ab1d9 ]
2007-07-02 15:12:27,625 [AdpaterExeMgrThread1] DEBUG NHibernate.Impl.SessionImpl [(null)] <(null)> - collection fully initialized: [RevenueRecognitionNamespace.Contract.RevenueRecognitions#bfdb095a110b4d40b7259a45c23ab1d9]
2007-07-02 15:12:27,625 [AdpaterExeMgrThread1] DEBUG NHibernate.Impl.SessionImpl [(null)] <(null)> - 2 collections initialized
2007-07-02 15:12:27,625 [AdpaterExeMgrThread1] DEBUG NHibernate.Loader.Loader [(null)] <(null)> - done loading collection
2007-07-02 15:12:27,625 [AdpaterExeMgrThread1] DEBUG NHibernate.Impl.SessionImpl [(null)] <(null)> - collection initialized
2007-07-02 15:12:27,625 [AdpaterExeMgrThread1] DEBUG NHibernate.Loader.Loader [(null)] <(null)> - done entity load
2007-07-02 15:12:27,625 [AdpaterExeMgrThread1] DEBUG NHibernate.Impl.ConnectionManager [(null)] <(null)> - after autocommit
2007-07-02 15:12:27,625 [AdpaterExeMgrThread1] DEBUG NHibernate.Impl.ConnectionManager [(null)] <(null)> - aggressively releasing database connection
2007-07-02 15:12:27,625 [AdpaterExeMgrThread1] DEBUG NHibernate.Impl.SessionImpl [(null)] <(null)> - transaction completion


Top
 Profile  
 
 Post subject:
PostPosted: Tue Jul 03, 2007 7:01 pm 
Expert
Expert

Joined: Fri Oct 28, 2005 5:38 pm
Posts: 390
Location: Cedarburg, WI
We had a similar problem and it was caused by lazy loading of collections failing when the key (identifier property) for the entity that the collection property is defined on is a char/nchar type instead of varchar/nvarchar, and the key value is not of the column's maximum length. Your SQL type is char(64) according to your mapping, which tells me you probably are having the same problem we had.

Check and see if you still have the problem if you change your SQL type to varchar/nvarchar, or if you use a key value that's the max length of the column (i.e. no opportunity for trailing whitespace).

We were able to resolve the problem without having to change the SQL type to varchar/nvarchar (we have to keep using NCHAR for misguided political reasons), but I can't remember how we solved it offhand. I'll look into it and post a reply with the answer. In the meantime verify that it's the trailing whitespace in the key value that's causing the problem ...


Top
 Profile  
 
 Post subject:
PostPosted: Tue Jul 03, 2007 7:05 pm 
Expert
Expert

Joined: Fri Oct 28, 2005 5:38 pm
Posts: 390
Location: Cedarburg, WI
See this post:

http://forum.hibernate.org/viewtopic.php?t=975743


Top
 Profile  
 
 Post subject:
PostPosted: Fri Jul 06, 2007 4:27 am 
Newbie

Joined: Mon Jun 25, 2007 4:19 am
Posts: 8
Thank you very much. The problem is solved succesfully with your advice.


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 10 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.