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: System.ArgumentException - Identifier Type Mismatch
PostPosted: Wed Aug 27, 2008 4:38 am 
Newbie

Joined: Tue Aug 26, 2008 5:15 am
Posts: 1
Hi.

I am trying to update data in SQL server 2005 database but i am getting error in this function as follows:

public T GetById(IdT id, bool shouldLock)
{
T entity;
//object id1 = (Object)id;
if (shouldLock)
{

entity = (T)NHibernateSession.Load(persitentType, id, LockMode.Upgrade);
}
else
{
entity = (T)NHibernateSession.Load(persitentType, id);
}
return entity;


}
and in the following line :

entity = (T)NHibernateSession.Load(persitentType, id,LockMode.Upgrade);

as Identifer Type mismatch for Id.


Top
 Profile  
 
 Post subject:
PostPosted: Thu Aug 28, 2008 5:56 am 
Expert
Expert

Joined: Thu Dec 14, 2006 5:57 am
Posts: 1185
Location: Zurich, Switzerland
What kind of type is IdT ? Can you post a mapping file ?

_________________
--Wolfgang


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.