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.  [ 5 posts ] 
Author Message
 Post subject: column named 'Size' bug
PostPosted: Fri Dec 29, 2006 9:54 am 
Newbie

Joined: Mon Jan 02, 2006 9:57 pm
Posts: 7
I was wondering if the bug where NHibernate would not be able to read the data in a column named 'Size' was fixed. I don't see it in the 1.0.3 release notes but they say almost every known bug was fixed. I looked for it in the Jira but I couldn't come up with a search that didn't have a ton of results. Can someone provide either an answer or a link to the Jira issue? If there is none, I'll write one up. Thanks.

Dan


Top
 Profile  
 
 Post subject:
PostPosted: Fri Dec 29, 2006 10:27 am 
Contributor
Contributor

Joined: Wed May 11, 2005 4:59 pm
Posts: 1766
Location: Prague, Czech Republic
We don't know about any such issue. Read the documentation and post problem details on the forum before submitting an issue to JIRA.


Top
 Profile  
 
 Post subject:
PostPosted: Fri Dec 29, 2006 10:56 am 
Newbie

Joined: Mon Jan 02, 2006 9:57 pm
Posts: 7
Ok. Let me pull together a way to reproduce it and I'll post the details.


Top
 Profile  
 
 Post subject:
PostPosted: Fri Dec 29, 2006 12:42 pm 
Newbie

Joined: Mon Jan 02, 2006 9:57 pm
Posts: 7
It's looking like I won't be able to retest this properly before January 3rd so I'll post what I can. I'm using NHibernate 1.0.2 and an Access DB via the JetDriver dll (which may be the cause of the problem). I apologize for not upgrading before posting. I don't have the time at the moment, I'm leaving on vacation in a couple of hours. I can upgrade and retest when I get back.

The following line in the .hbm.xml file and corresponding property in the .cs causes a crash.
Code:
<property column="Size" type="Int32" name="Size" />

Exception:
Unable to perform find

Inner Exception:
IErrorInfo.GetDescription failed with E_FAIL(0x80004005).
Stack Trace:
   at System.Data.OleDb.OleDbCommand.ExecuteCommandTextForSingleResult(tagDBPARAMS dbParams, Object& executeResult)
   at System.Data.OleDb.OleDbCommand.ExecuteCommandText(Object& executeResult)
   at System.Data.OleDb.OleDbCommand.ExecuteCommand(CommandBehavior behavior, Object& executeResult)
   at System.Data.OleDb.OleDbCommand.ExecuteReaderInternal(CommandBehavior behavior, String method)
   at System.Data.OleDb.OleDbCommand.ExecuteReader(CommandBehavior behavior)
   at System.Data.OleDb.OleDbCommand.ExecuteReader()
   at NHibernate.JetDriver.JetDbCommand.System.Data.IDbCommand.ExecuteReader()
   at NHibernate.Impl.BatcherImpl.ExecuteReader(IDbCommand cmd)
   at NHibernate.Loader.Loader.GetResultSet(IDbCommand st, RowSelection selection, ISessionImplementor session)
   at NHibernate.Loader.Loader.DoQuery(ISessionImplementor session, QueryParameters queryParameters, Object optionalObject, Object optionalId, Object[] optionalCollectionKeys, Boolean returnProxies)
   at NHibernate.Loader.Loader.DoQueryAndInitializeNonLazyCollections(ISessionImplementor session, QueryParameters queryParameters, Object optionalObject, Object optionalId, Object[] optionalCollectionKeys, Boolean returnProxies)
   at NHibernate.Loader.Loader.DoList(ISessionImplementor session, QueryParameters queryParameters)
   at NHibernate.Loader.Loader.List(ISessionImplementor session, QueryParameters queryParameters, ISet querySpaces, IType[] resultTypes)
   at NHibernate.Loader.CriteriaLoader.List(ISessionImplementor session)
   at NHibernate.Impl.SessionImpl.Find(CriteriaImpl criteria)


Top
 Profile  
 
 Post subject:
PostPosted: Fri Dec 29, 2006 1:38 pm 
Contributor
Contributor

Joined: Wed May 11, 2005 4:59 pm
Posts: 1766
Location: Prague, Czech Republic
A problem that often happens is when a column is named using a reserved word. In this case you should quote the column name using backticks. However, it would be easier to diagnose the problem if the GetDescription call didn't fail...


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