Regular |
 |
Joined: Fri Feb 03, 2006 5:28 pm Posts: 73 Location: Québec, QC, Canada
|
Here is how I retreive a member from my db:
membre = (Membre)session.Load(typeof(Membre), myid);
where myid is of type long.
in the mysql, I use int as the db column type.
and I use native as the id type in the mapping files.
I use nhibernate 1.2.0
The thing is.. I get a type mismatch error:
identifier type mismatch
Parameter name: id
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.ArgumentException: identifier type mismatch
Parameter name: id
Source Error:
Line 30: {
Line 31: session = NHibernateFactory.GetSession();
Line 32: membre = (Membre)session.Load(typeof(Membre), myid);
Line 33: }
Line 34: catch (HibernateException ex)
Any idea why?
|
|