-->
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: Hibernate.PropertyAccessException
PostPosted: Fri Dec 03, 2010 6:44 am 
Newbie

Joined: Tue Dec 22, 2009 8:38 am
Posts: 18
Hello everyone,

When performing the save of an entity (let's call it Route) I am receiving the following exception:

Code:
Hibernate.PropertyAccessException : Exception occurred getter of Project.Domain.Client.Id
System.Reflection.TargetException : Object does not match target type.


I am puzzled by this exception, as I have not loaded any of the entities of the class Client... The only moment when NHibernate accesses the getter of the Client class is when creating the session factory and the subsequent opening of a session object.

The declaration of the identifier for the Client class is trivial, nothing special about it:
Code:
    <id name="Id" column="Id" access="property" type="Int32">
      <generator class="identity" />
    </id>


What means this error and why could it have been triggered ? How can I solve this problem ?

Thabk you,
C.


Top
 Profile  
 
 Post subject: Re: Hibernate.PropertyAccessException
PostPosted: Fri Dec 03, 2010 7:25 am 
Newbie

Joined: Tue Dec 22, 2009 8:38 am
Posts: 18
Sorry bothering you ... problem solved. It was a mapping problem.


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.