-->
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: Mashed IDGenerator
PostPosted: Fri Nov 24, 2006 4:41 am 
Beginner
Beginner

Joined: Tue May 11, 2004 8:24 am
Posts: 23
Hi,

I have an application I would like deploy in 2 versions: standalone and serverbased.
The serverbased version is currently in production using PostgreSQL as backend. After some testing I found Apache Derby a good engine for the standalone application.

I would like to use one set of mappping.hbm.xml's for configuration.
Datatypes and Fieldnames work pretty good after a little work, but I am struggling with the id-generators.
PostgreSQL uses sequences which are not supported by Derby.
With <generator class="native"/> Derby uses a hilo table.

How can I manage these two configurations with only one set of mapping files?
- Is there a way to modify the meta information programmatically?
- Should I subclass "PersistentIdentifierGenerator" and so wrap the underlying mechanism?
- Or should I modify the xml-dom before configuration?

Thank you for any ideas and help.

Regards,

Alex


Top
 Profile  
 
 Post subject:
PostPosted: Tue Nov 28, 2006 8:55 am 
Senior
Senior

Joined: Mon Oct 23, 2006 5:12 am
Posts: 141
Location: Galicia, Spain
See 3.1. Programmatic configuration in

http://www.hibernate.org/hib_docs/v3/re ... ation.html

_________________
andresgr (--don't forget to rate)


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.