-->
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.  [ 7 posts ] 
Author Message
 Post subject: Views and Hibernate
PostPosted: Mon Apr 25, 2005 3:56 pm 
Beginner
Beginner

Joined: Tue Apr 19, 2005 9:39 am
Posts: 45
I have a view in my DB that has the following information

TableName ColumnName ColumnIndex

It is just a join of some system tables that will allow my web app to be more dynamic. How do I map this view with Hibernate?? I read that you can treat a view like a table but for this instance this view is not normalized meaning...

TableName ColumnName ColumnIndex
A dd 1
A sss 2
B a 1

That is in the table and a table name won't be exclusive for every entry


Any help or claificaiton would be great!!

Thanks in advace.

b


Top
 Profile  
 
 Post subject:
PostPosted: Mon Apr 25, 2005 3:57 pm 
Beginner
Beginner

Joined: Tue Apr 19, 2005 9:39 am
Posts: 45
Just wanted an email reminder ;)


Top
 Profile  
 
 Post subject:
PostPosted: Mon Apr 25, 2005 11:19 pm 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 3:00 pm
Posts: 1816
Location: Austin, TX
Well you'd have a composite key...

Beware that a lot of databases have strict rules about perfoming DML against views (inserts, updates, deletes).


Top
 Profile  
 
 Post subject:
PostPosted: Tue Apr 26, 2005 9:09 am 
Beginner
Beginner

Joined: Tue Apr 19, 2005 9:39 am
Posts: 45
Right, this is going to be just a reference table where that application writer can lookup when he or she wants to put all the columns with check boxes, the names of the columns are also in user friendly form.


Thanks, Ill keep whomever posted ;)


Top
 Profile  
 
 Post subject: DB2 Views and Hibernate
PostPosted: Tue Apr 26, 2005 12:40 pm 
Beginner
Beginner

Joined: Tue Apr 19, 2005 9:39 am
Posts: 45
Views don't have primary keys in DB2.

How can I simply query a view that I have on the database side, and assign that resulting query to a bean????

Thanks


Top
 Profile  
 
 Post subject:
PostPosted: Tue Apr 26, 2005 3:25 pm 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 3:00 pm
Posts: 1816
Location: Austin, TX
I said key. Whether or not you have a physical PK on the database is irrelevant to Hibernate. I suggest just trying things out.


Top
 Profile  
 
 Post subject:
PostPosted: Tue Apr 26, 2005 3:35 pm 
Beginner
Beginner

Joined: Tue Apr 19, 2005 9:39 am
Posts: 45
Thank you.


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 7 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.