-->
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.  [ 5 posts ] 
Author Message
 Post subject: DDL generation from class containing enum
PostPosted: Tue May 15, 2007 1:17 pm 
Beginner
Beginner

Joined: Wed Apr 13, 2005 12:49 pm
Posts: 34
Hey folks,

I'm trying to retrieve the DDL for a table. I've generated the class file
Alert.java. It's a simple pojo with a few fields however one of which is an enum. I've had a scour of the hibernate-tools document and can see how to generate ddl using the hibernate-tools task yet it doesn't seem to explain how to generate the ddl from solely the java. Is this possible or am I asking too much? If so is there any restrictions on the use of enums?

Thanks,
Mark


Top
 Profile  
 
 Post subject:
PostPosted: Tue May 15, 2007 2:33 pm 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 6:10 am
Posts: 8615
Location: Neuchatel, Switzerland (Danish)
did you annotate the java so its an JPA entity ? then it should work if you use the annotationconfiguration or jpaconfiguration if you have a META-INF/persistence.xml file

_________________
Max
Don't forget to rate


Top
 Profile  
 
 Post subject:
PostPosted: Wed May 16, 2007 4:26 am 
Beginner
Beginner

Joined: Wed Apr 13, 2005 12:49 pm
Posts: 34
To be honest I'm not familiar enough with the various extensions to try this. I'll get onto it today and post back if I can't seem to get it to work.

Thanks.


Top
 Profile  
 
 Post subject:
PostPosted: Wed May 16, 2007 11:09 am 
Beginner
Beginner

Joined: Wed Apr 13, 2005 12:49 pm
Posts: 34
Hi Max,

honestly all I'm trying to do is to map a reference table containing three entries to a java 5 class containing an enum severity {ERROR, WARN, FATAL}

Is it possible to map java5 enums to reference tables using hibernate?

Thanks,
Mark.


Top
 Profile  
 
 Post subject:
PostPosted: Sat May 19, 2007 1:08 pm 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 6:10 am
Posts: 8615
Location: Neuchatel, Switzerland (Danish)
not tool related, ask in the jpa/annotations user forum.

_________________
Max
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.  [ 5 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.