-->
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: Middlegen-Hibernate plugin setting sequence to use for id
PostPosted: Tue Aug 10, 2004 8:32 pm 
Newbie

Joined: Sat Apr 24, 2004 6:25 pm
Posts: 14
Location: Rochester, NY
I am using the Middlegen-Hibernate-R5 plugin to generate hibernate HBM and java classes.

I would like to use a sequence as the generator and each table have its own sequence. For example

Customer uses customer_seq
order uses order_seq

I see that it is possible to set this in the middlegen GUI. It is redundant and tedious to set this for all tables though. Is it possible to set defaults on the plugin in the ant task. For example

<hibernate destination="${hibernate-src.dir}" package="${base.package}.data" javaTypeMapper="middlegen.plugins.hibernate.HibernateJavaTypeMapper" genXDocletTags="true" defaultGenerator="sequence" sequencePattern="{0}_seq"/>

Any thoughts?

Ben


Top
 Profile  
 
 Post subject:
PostPosted: Thu Aug 12, 2004 8:30 pm 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 7:19 pm
Posts: 2364
Location: Brisbane, Australia
Currently you cannot do this via the Ant script (but you can set the generator to native using Ant). You can change the properties by editing the preference file. This is a good idea. I'll consider adding to my todo list.


Top
 Profile  
 
 Post subject: Definately a cool idea
PostPosted: Fri Aug 13, 2004 11:02 am 
Newbie

Joined: Fri Jun 18, 2004 11:33 am
Posts: 6
Location: Pennsylvania, USA
I'm having the same issue. That would be really cool if you could implement that. By default postgresql uses a pattern of <tablename>_<idname>_seq


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.