-->
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: Hibernate and Database Views
PostPosted: Mon Oct 24, 2005 9:29 am 
Newbie

Joined: Mon Oct 24, 2005 9:16 am
Posts: 6
I am using Hibernate with WSAD and i would to know if it is possible to map database views in Hibernate and how to do it.

Thanks


Top
 Profile  
 
 Post subject: Re: Hibernate and Database Views
PostPosted: Mon Oct 24, 2005 9:35 am 
Expert
Expert

Joined: Mon Feb 14, 2005 12:32 pm
Posts: 609
Location: Atlanta, GA - USA
Ida wrote:
I am using Hibernate with WSAD and i would to know if it is possible to map database views in Hibernate and how to do it.

Thanks


You do it exactly the same way you would map to a table.

_________________
Preston

Please don't forget to give credit if/when you get helpful information.


Top
 Profile  
 
 Post subject: Hibernate and Database Views
PostPosted: Mon Oct 24, 2005 9:43 am 
Newbie

Joined: Mon Oct 24, 2005 9:16 am
Posts: 6
Thanks for your answer, Pksiv,

I'm trying to create the mapping file for my view but it seems that the attribute "view" doesn't exist:

I can write for a table: <class name="Myclass" table="TableName">

but if i try to write for my view :
<class name="Myclass" view="ViewName">, I got an error.


Top
 Profile  
 
 Post subject: Re: Hibernate and Database Views
PostPosted: Mon Oct 24, 2005 9:45 am 
Expert
Expert

Joined: Mon Feb 14, 2005 12:32 pm
Posts: 609
Location: Atlanta, GA - USA
Ida wrote:
Thanks for your answer, Pksiv,

I'm trying to create the mapping file for my view but it seems that the attribute "view" doesn't exist:

I can write for a table: <class name="Myclass" table="TableName">

but if i try to write for my view :
<class name="Myclass" view="ViewName">, I got an error.


Just use table="ViewName".... that's what I meant when I said ".. exactly the same way..." ;-)

_________________
Preston

Please don't forget to give credit if/when you get helpful information.


Top
 Profile  
 
 Post subject: Hibernate and Database Views
PostPosted: Mon Oct 24, 2005 9:48 am 
Newbie

Joined: Mon Oct 24, 2005 9:16 am
Posts: 6
Ok, i'll try it then as you said, pksiv.
Thanks a lot


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.