-->
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: Enum mapping with existing table
PostPosted: Mon Jul 14, 2008 5:22 pm 
Newbie

Joined: Mon Jul 14, 2008 4:52 pm
Posts: 6
Location: London
Hibernate version: 3.2.6

Hi everyone,

I've tried to find a solution on the forum, there are a lot of enum discussions but i didn't find what I'm looking for.


We have an existing dataBase with lots of tables representing enum, (customerType, productType, ...) which we are integrating with hibernate.

for example, the customer table has a Long field "customerType" which is a foreign key to the CustomerType table.


I would like to move those tables to Java Enum but I have a few questions :

- Is there a way to keep my tables for direct SQL report but having a clean design a not having to synchronize my enum to those tables manually everytime we update the enum ?

I don't really like the idea of having unused tables (at least from the java code) but i don't see many of options and I think Enum would be better, isnt it ?


Thank you.


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.