hi all, 

i'm using maven 2.0.1 , struts2 modular, and trying to make simple master
detail case

1. create Master and detail  pojo and make them related
Master Pojo :

    @OneToMany(mappedBy="master")
    public Set<Detail> getDetails() {
        return details;
    }

Child Pojo :

    @ManyToOne
    @JoinColumn(name = "master_id", insertable = false, updatable = false)
    public Master getDetail() {
        return Master;
    }

2. add hibernate.cfg.xml
3. run : mvn appfuse:gen and mvn appfuse for Master and Detail from /core
4  ocerride master dao and Master manager classes
5. put some sample data ini sample-data.xml, to make sure that i have
related data for master detail
5. create unit test for MasterManager and put some debug line :

   Master object is loaded successful, but child's is  null.  (
master.gerChilds(); )
   
   i was make sure that related child data is exist.
   and from hibernate SQL debug, and i saw the SQL only select from master
table.

   is that any step that i missed ? 
   why master.gerChilds() value is null return  ?


regards,
Yuke

   


regards,
Yuke



regards,
Yuke
-- 
View this message in context: 
http://www.nabble.com/hibernate-master-detail-problem-tp14290986s2369p14290986.html
Sent from the AppFuse - User mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to