-->
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.  [ 2 posts ] 
Author Message
 Post subject: 1:n HQL Problem
PostPosted: Thu Sep 30, 2010 5:12 am 
Newbie

Joined: Thu Jul 15, 2010 5:06 am
Posts: 7
Hallo!
Ich habe eine Tabelle die der n Teil einer 1:n Verbindung ist. Allerdings haben nicht alle Datensätze dieser Tabelle eine Verbindung zu 1. Mein Problem ist nun dass ich eine HQL Abfrage machen möchte die mir alle Datensätze dieser Tabelle ausgibt egal ob sie nun in dieser 1:n Verbindung modelliert sind. Wie geht das? Mit Criteria konnte ich es bisher auch nicht schaffen, mir wäre HQL iregndwie lieber.

Danke für eure Hilfe!
Florian


Top
 Profile  
 
 Post subject: Re: 1:n HQL Problem
PostPosted: Mon Oct 04, 2010 3:32 am 
Newbie

Joined: Wed Sep 22, 2010 6:56 am
Posts: 6
kannst du nicht einfach mit loadAll() arbeiten?
oder ist die Tabelle nicht gemappt?

Code:
public List<CounterWert> selectAll() {
        return getHibernateTemplate().loadAll(CounterWert.class);
    }



Ansonsten könnte dir das hier vielleicht auch weiterhelfen
http://www.java-forum.org/datenbankprogrammierung/104880-hibernate-problem-bidirektionaler-1-n-verbindung.html


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