-->
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.  [ 1 post ] 
Author Message
 Post subject: Defining custom properties on existing domain objects
PostPosted: Sun Mar 07, 2010 7:29 pm 
Newbie

Joined: Sun Mar 07, 2010 7:19 pm
Posts: 1
Hi,

I have a product that is used at a number of clients. I would like to add a feature to the application that allows clients to define custom properties on a few of the domain objects. Our domain model uses hibernate annotations and hibernate validator to provide all metadata to hibernate. I am not overly concerned with the ability to define new properties at run time, my main concern is to provide our clients with the capability to add custom attributes to these objects. It is fine for the client to request a new property, then have a developer make a configuration change and then restart the application to allow the sessions to all clear out and the session factory to be rebuilt from the configuration object. Furthermore, I do not want to move all of the "custom" fields in to the beans that make up our data model, nor do I want to branch the application for each client in order to support all of their individual needs.

This approach looks fairly close to what I would like: http://www.infoq.com/articles/hibernate-custom-fields. The ability to load fields in the database in to a map of name / value pairs works great. However, that approach relies on dynamic-components, which as far as I can tell are not available via annotations.

I have also looked at switching the EntityMode of the application to map, but that does not appear to make much sense since all of our metedata is in annotations and we do not want to base the application off the "map of maps" data model.

If anyone has any ideas or feedback, it would be greatly appreciated.

Thanks,

Scott


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 

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.