-->
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: Web pages displaying multitable query - best practice
PostPosted: Thu Jan 20, 2005 1:43 pm 
Regular
Regular

Joined: Thu Aug 19, 2004 9:28 am
Posts: 63
Hibernate version:
2.1

Name and version of the database you are using:
ASE 12.5


Hi,

As the subject of this post indicate, this isn't a bug/problem. It's a Hibernate newbie question :)

Here's the scenario...
Retrieve data from database, multiple table and columns, using HQL.
Show the data on the web page
Receive the modified data (user can only modify data of one of the tables)
Save changes.

Pretty simple isn't it.

I'm strugglinh to understand how to do that without having to re-retrieve data form that single table that the user can modify and that I have to save to the DB.

I use "session.createQuery(select new myClass(table1.col1, table1.col2, table2.col1, ...) from table1.col1=10)". So, myClass now contains 1 row with data from many tables. But I can't ask Hibernate to save myClass.
Or, I should say, I don't know how to ask Hibernate. Do I have to declare myClass somewhere?

I would appreciate any help you can offer. I'm lost. Thanks.


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.