NetBeans Forums

 FAQFAQ   SearchSearch   MemberlistMemberlist   RegisterRegister   ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
  

Workaround needed: New Entity Class from Database cannot be created when a table does not have a primary key...

 
Post new topic   Reply to topic    NetBeans Forums -> Java EE Users
View previous topic :: View next topic  
Author Message
alxp



Joined: 02 Oct 2009
Posts: 1

PostPosted: Fri Oct 02, 2009 6:17 pm    Post subject: Workaround needed: New Entity Class from Database cannot be created when a table does not have a primary key... Reply with quote

Hello everyone,

first of all - the nb db reverse engineering mechanism 'Entity Classes from Database' is really really great.

I encountered a huge problem: our legacy db has a lot of tables that do not have a primary key but an unique index. I am not allowed to create entities from those tables - the message is "Table xyz cannot be added because it does not have a primary key".

What can I do without altering the tables? I would simply like to specify which attributes to map as primary key. The other option would include netbeans to look at a table's index (nb shows the index for the table perfectly well) if no primary keys explicitely exist.

Any help or consolation available?

Thanks!
Alex
Back to top
Display posts from previous:   
Post new topic   Reply to topic    NetBeans Forums -> Java EE Users All times are GMT
Page 1 of 1

 
Jump to:  
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
You cannot vote in polls in this forum
You can attach files in this forum
You can download files in this forum


Powered by phpBB
By use of this website, you agree to the NetBeans Policies and Terms of Use. © 2012, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo