-->
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: master read as empty
PostPosted: Mon Jan 12, 2015 9:58 pm 
Newbie

Joined: Mon Jan 12, 2015 9:45 pm
Posts: 1
I created Hibernate entity classes from NetBeans master. All works Ok except if I open detail entity by HQL then master will be empty (all fields will be null, '' or 0). I use Hibernate 4.3.
Example:
in master (DealerMain):
@OneToMany(fetch=FetchType.LAZY, mappedBy="dealerMain")
public Set<AccountMain> getAccountMains() {
return this.accountMains;
}

in detail (AccountMain):
@ManyToOne(fetch=FetchType.LAZY)
@JoinColumn(name="GroupID", nullable=false)
public DealerMain getDealerMain() {
return this.dealerMain;
}

If I open AccountMain by HQL then all fields in AccountMain.getDealerMain() will be empty. SQL operator right.
But if I'll open before DealerMain (dealer of the account) then dealerMain will be right.
I looked in debugger what wrong master if used Hibernate generated class derived from DealerMain.
Any suggestions?

Thanks,
Haim Fridland.


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.