-->
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: Middlegen cannot define primary key for table view
PostPosted: Mon May 17, 2004 1:39 pm 
Beginner
Beginner

Joined: Wed Sep 10, 2003 5:32 pm
Posts: 28
Hi everyone,

I have define two table views in my Oracle database and I have primary keys define for those views. I am trying to use Middlegen to generate the hibernate xml files but I cannot find a way to define primary keys manually in middlegen. Is there anyway that I can define primary key manually through middlegen so that I can include my table view with primary key?? Thanks

Vivian


Top
 Profile  
 
 Post subject:
PostPosted: Mon May 17, 2004 4:35 pm 
Senior
Senior

Joined: Fri May 14, 2004 9:37 am
Posts: 122
Location: Cologne, Germany
To point thinks out a bit. So you run middlegen and it is not able so see the primary keys ? Should be a warning on startup. Then I would suggest to get a JDBC3 driver for Oracle. should be on the OTN. If only the views doesnot contain the primary keys then just generate the mapping files and modify theses. Should be straight forward if you read the hibernate documentation carefully. Btw using Middlegen for generating two mapping files is like in german called: "Mit Kannonen auf Spatzen schiessen".

best regards

Olaf


Top
 Profile  
 
 Post subject:
PostPosted: Tue May 18, 2004 3:58 am 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 7:19 pm
Posts: 2364
Location: Brisbane, Australia
Middlegen uses the meta data from the JDBC driver for the field properties. You cannot (currently) tell Middlegen that a field is a primary key.


Top
 Profile  
 
 Post subject:
PostPosted: Tue May 18, 2004 10:10 am 
Beginner
Beginner

Joined: Wed Sep 10, 2003 5:32 pm
Posts: 28
Hi everyone,

I have found a solution. When you download the new Middlegen version from CVS, you can use pkcolumnsoverride attribute in table element and this attribute can declare primary key for table view. Thanks for all the inputs. :) :)

Vivian


Top
 Profile  
 
 Post subject:
PostPosted: Tue May 18, 2004 9:09 pm 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 7:19 pm
Posts: 2364
Location: Brisbane, Australia
It is true the CVS version has more support in this area. Glad to see you reading the info.


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.