-->
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: inheritance in hibernate
PostPosted: Thu May 06, 2004 5:54 am 
Newbie

Joined: Mon Apr 05, 2004 10:40 am
Posts: 19
i have 2 classes that iherit from the main class
each class has associations with ohter class (Intervenant).
i wrote my file hbm for the main class (i use joined-subclass..)

public class MyAction implements Serializable {

private Integer id_action = null;
....}
public class MyActionIndividuelle extends MyAction implements Serializable {

private Intervenant intervenant ;
....
}
public class MyActionGroupe extends MyAction implements Serializable {

private Set participants = new HashSet();
private Intervenant responsable ;...}

public class Intervenant implements Serializable {

private Integer id_intervenant = null;
....
private Set actionsgroupe = new HashSet();
private Set actionsindividuelle = new HashSet();
private Set actionsGResponsable = new HashSet();}

the problem is:
when i use

Query query = session.createQuery(
"select elements(interv.actionsindividuelle) from com.cosoftware.Intervenant interv join interv.actionsindividuelle as indiv where indiv.id_action=2 and interv.id_intervenant=1 ");
return query.list();

in a class IntervenantManager that not retrieve the right information from DB (Mysql)

Thanks for all helps.


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.