-->
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.  [ 3 posts ] 
Author Message
 Post subject: allowing custom PropertyAccessors using annotations ?
PostPosted: Sat Nov 05, 2005 11:33 am 
Newbie

Joined: Thu Oct 27, 2005 6:53 am
Posts: 3
Hi all,

My problem deals with persistent property access :

I've implemented my domain entities as dynamic proxies, so direct field access is not a solution for hibernate to update their state.

They also have behaviour (business rules) attached to setters whenever the set value actually changes the internal state (this behaviour is attached at run-time using some configuration). So the property access is not suitable since it would trigger the behaviour attached to the setter whenever the persistence layer access the property to technically update its state.
So I've created a generic technical mutator on my entities root class like setPropertyWithoutTriggerringBehaviour(String propertyName, Object value).
Using regular hibernate mapping files, it's just straightforward to implement and install a custom PropertyAccessor to use this mutator and it works like a charm.

Now, I want to migrate my code to annotation based configuration and the only options I have for state access is entity-wide (that's fine for me) and restricted to FIELD or PROPERTY (which comes from the JSR).

So I was wondering if there was any planned enhancement for using custom PropertyAccessor with annotations (presumably defining some hibernate specific extension) ?

Thanks and regards,

Vincent

_________________
Vince


Top
 Profile  
 
 Post subject:
PostPosted: Sun Nov 06, 2005 10:06 am 
Hibernate Team
Hibernate Team

Joined: Sun Sep 14, 2003 3:54 am
Posts: 7256
Location: Paris, France
Sure but not in the following weeks. I still need to fine a nice way to override the strategy at the field granularity using annotations.

_________________
Emmanuel


Top
 Profile  
 
 Post subject:
PostPosted: Sun Nov 06, 2005 1:48 pm 
Newbie

Joined: Thu Oct 27, 2005 6:53 am
Posts: 3
Thanks for your reply Emmanuel.
I think I will go for xdoclet tags until then.

Regards

_________________
Vince


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