-->
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.  [ 3 posts ] 
Author Message
 Post subject: select
PostPosted: Tue Aug 01, 2006 10:22 am 
Beginner
Beginner

Joined: Thu Jun 22, 2006 8:56 am
Posts: 22
Hello,

do i always have to declare my tables into hbm.xml files?
I do have 4 tables and i only want to make select on them and put their values to one table from hbm.file.

I thought that i need this hbm.xml only for mapping.

Thank you in advance,

seven-12


Top
 Profile  
 
 Post subject:
PostPosted: Tue Aug 01, 2006 1:42 pm 
Beginner
Beginner

Joined: Wed Jun 28, 2006 2:24 pm
Posts: 30
Location: Brazil
You need to declare your tables into .hbm.xml file if you want to access yours tables with Hibernate.


Top
 Profile  
 
 Post subject:
PostPosted: Wed Aug 02, 2006 5:09 am 
Beginner
Beginner

Joined: Thu Jun 22, 2006 8:56 am
Posts: 22
Thank you.

But i still have one question :
i have this select query:

session.createQuery("select meta.titel, meta.url, meta.picture, meta.text from lm_meta as meta, lm_word as word, lm_word_to_meta as meta_word where word.word = '" + dest+ "'
and word.id = meta_word.word_id and meta_word.meta_id = meta.id ORDER BY meta.time DESC LIMIT 1")

I need titel, url, picture, text from table meta. I put this to other table: Source_table into 4 columns.

I am not sure which kind of mapping do i have to choose.
If i declare all tables as separated classes i do need to write separated java classes for each table. Do i always have to write one class for each table?

Thank you very much,

greetings ,

seven-12


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