-->
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: Enforce Hibernate / JPA to re-scan entity annotations?
PostPosted: Mon Oct 24, 2011 8:09 am 
Newbie

Joined: Thu Oct 15, 2009 8:04 am
Posts: 6
Hi everyone,

we are usig Hibernate as persistence provider under JBoss AS 5.1.0 and also in Java SE deployments. In both scenarios Hibernate scans the entity class definitions for annotations during an early initialization phase and stores the information about the entities (ORM) for the lifetime of the process.

I would be interested in a way to force Hibernate to re-read the entity definitions (ORM) at a later point in time. The reason for doing so is that we plan to have one or more entity classes that will be extended with additional persistent properties at runtime (e.g. via javassist). While we can extend entities already, Hibernate would not accept recently added properties because of its initial snapshot.

Thanks for sharing your opinions and experiences,
-Rainer


Top
 Profile  
 
 Post subject: Re: Enforce Hibernate / JPA to re-scan entity annotations?
PostPosted: Fri Nov 14, 2014 7:10 am 
Newbie

Joined: Fri Nov 14, 2014 6:59 am
Posts: 1
Can someone please reply to this post with some solution i need the similar thing. I am using play framework with JPA+hibernate. In development mode when application reloads JPA entities are no longer detected and i receive the exceptions like

[IllegalArgumentException: Type specified for TypedQuery [models.User] is incompatible with query return type [class models.User]]


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.