-->
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.  [ 11 posts ] 
Author Message
 Post subject: NHibernate 1.0.2
PostPosted: Sun Jan 15, 2006 10:39 am 
Contributor
Contributor

Joined: Wed May 11, 2005 4:59 pm
Posts: 1766
Location: Prague, Czech Republic
This release fixes most reported bugs (especially in the reflection optimizer) and introduces various small improvements.

Release notes: NHibernate, NHibernateContrib


Last edited by sergey on Fri Nov 03, 2006 2:24 am, edited 1 time in total.

Top
 Profile  
 
 Post subject: NHibernate 1.0.2
PostPosted: Mon Jan 16, 2006 1:02 am 
Beginner
Beginner

Joined: Mon Aug 15, 2005 11:09 pm
Posts: 23
Hey. Thanks for the new release and your continued efforts.

So far I've had a couple of issues converting from 1.0.1.

- First the following line fails to work. It was fine in 1.0.1.
Code:
<property name="WeekDay" column="WeekDay" type="System.DayOfWeek" not-null="true" />

with the exception:
Code:
Could not compile the mapping document
NHibernate.MappingException: could not interpret type: System.DayOfWeek


- Secondly I get a strange mapping exception with one class which worked fine with 1.0.1. The mapping hasn't been changed and everything looks fine to me. Even stranger is that the initial save works perfectly fine.

Code:
NHibernate.LazyInitializationException: Failed to lazily initialize a collection ---> NHibernate.MappingException: Invalid mapping information specified for type WasteLinkWebService.Entity.Generator.Inspection, check your mapping file for property type mismatches ---> System.InvalidCastException: Specified cast is not valid.
   at NHibernate.Persister.GetSetHelper_WasteLinkWebService_Entity_Generator_Inspection.SetPropertyValues(Object obj, Object[] values)

Is there any easy way I can find out which property has the issue? I've been unable to find the cause so far.


Top
 Profile  
 
 Post subject:
PostPosted: Mon Jan 16, 2006 5:39 am 
Contributor
Contributor

Joined: Wed May 11, 2005 4:59 pm
Posts: 1766
Location: Prague, Czech Republic
For the DayOfWeek issue - oops, I introduced this while rewriting the way types are loaded. To work around it, qualify the type name with its assembly name (e.g. "System.DayOfWeek, mscorlib, Version=...")

For the second one - this comes from the reflection optimizer and reporting the property name would slow things down, so you'll have to check every property. Look for mismatches such as having an Int16 property and mapping it as Int32. If you still can't find the problem, open a new thread and post your classes and mappings.


Top
 Profile  
 
 Post subject:
PostPosted: Tue Jan 17, 2006 6:11 pm 
Pro
Pro

Joined: Fri Nov 19, 2004 5:52 pm
Posts: 232
Location: Chicago, IL
Thanks for the update. Would it be possible to make it so that the SQL parameters are logged under a different name like "NHibernate.Type" rather than "NHibernate.SQL"? i.e. the way it works with Hibernate for Java which uses org.hibernate.SQL and org.hibernate.type. This way you can enable logging of SELECT/UPDATE, etc. statements without seeing all the parameters. Otherwise, there is too much data in the logs if you only want to see the SQL statements.


Top
 Profile  
 
 Post subject:
PostPosted: Tue Jan 17, 2006 7:36 pm 
Contributor
Contributor

Joined: Thu May 12, 2005 8:45 am
Posts: 226
How are you filtering your log4net statements? We used to log the SQL statements, but I don't remember if the parameters were logged as well.


Top
 Profile  
 
 Post subject:
PostPosted: Tue Jan 17, 2006 8:30 pm 
Pro
Pro

Joined: Fri Nov 19, 2004 5:52 pm
Posts: 232
Location: Chicago, IL
I think the logging of parameters is something new as of version 1.0.2. It said something about it in the release notes. I'm using something similar to the following for my logging config.

Code:
<logger name="NHibernate.SQL" additivity="false">
  <level value="DEBUG"/>
  ...
</logger>


It's not a major issue, just a difference that I noticed from Hibernate for Java.

In the future, I think it would be kind of nice if NHibernate just used .NET 2.0 trace logging (for the sake of simplicity). .NET 2.0 has the TraceSource class now which allows you to divide the trace messages into different categories (something you can't do in prior versions of .NET to my knowledge).


Top
 Profile  
 
 Post subject:
PostPosted: Wed Jan 18, 2006 4:52 am 
Contributor
Contributor

Joined: Wed May 11, 2005 4:59 pm
Posts: 1766
Location: Prague, Czech Republic
Hmm, when parameters weren't logged, users kept asking for having them logged. When they are logged, they ask for not having them logged :-)

Why I added the logging of parameters (and yes, it's a new feature of 1.0.2): SQL logging is only meant to be used for when you are debugging something, not in production, and in debugging it's usually better to give more information.

I guess I can create a separate logger for parameters, but a) you will have to create a JIRA issue for that, and b) it almost certainly won't be done for 1.0.x.


Top
 Profile  
 
 Post subject:
PostPosted: Wed Jan 18, 2006 11:17 am 
Pro
Pro

Joined: Fri Nov 19, 2004 5:52 pm
Posts: 232
Location: Chicago, IL
Hehe. Sorry for being such a pain. ;-) I wouldn't worry about it. It's not that big of an issue. I'd much rather have the parameters than not. I think it's a nice improvement.

I'd much rather have you implement generics support instead. If you do that, I promise never to mention logging again! ;-)


Top
 Profile  
 
 Post subject:
PostPosted: Wed Jan 18, 2006 3:04 pm 
Contributor
Contributor

Joined: Thu May 12, 2005 8:45 am
Posts: 226
jemiller wrote:
Code:
<logger name="NHibernate.SQL" additivity="false">
  <level value="DEBUG"/>
  ...
</logger>


I believe we used to log on the "NHibernate.Loader" to obtain the SQL statements, but that was around NHibernate 0.8 or so.


Top
 Profile  
 
 Post subject: Continued Support for NHibernate
PostPosted: Mon May 08, 2006 3:21 am 
Newbie

Joined: Mon May 08, 2006 2:58 am
Posts: 1
Sergey & NHIBERNATE Team,

I am not sure if this was brought out before, excuse me if this is a repost.

Anyway, as far as I know Hibernate is under JBoss's umbrella and that includes NHibernate as well. Since JBoss is now acquired by a linux-distro company, will that affect NHibernate in the future? Meaning, will there be a continued support commitment for NHibernate for years to come? I love NHibernate/Hibernate makes my life easier as a developer and I don't want to end up into a dead-end again.


Top
 Profile  
 
 Post subject:
PostPosted: Fri Sep 08, 2006 12:10 pm 
Regular
Regular

Joined: Thu Aug 24, 2006 2:05 am
Posts: 80
Does it a counterpart of Hibernate 3.x?


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