-->
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: Upgrading from JPA hibernate 4.2.* to 4.3.5 problem
PostPosted: Mon Nov 17, 2014 1:43 pm 
Newbie

Joined: Tue Jun 25, 2013 6:52 am
Posts: 7
Hello Professionals,

i have a working application that work with hibernate 4.2.* without any problems when i upgrade to hibernate 4.3.5 i have the following exception when i execute the following JPA query :

SELECT A FROM MAIL_INTERNAL_COPY A WHERE mail.id = 172

Exception :

javax.ejb.EJBException: javax.persistence.EntityNotFoundException:
Unable to find com.wish.diwan.model.client.mail.entity.MailBean with id 172


the record 172 in database

My Entity :

@Entity(name="MAIL_INTERNAL_COPY")
@Table(name="MAIL_INTERNAL_COPY")
public class MailInternalCopyBean


@ManyToOne(fetch=FetchType.EAGER )
@JoinColumn(name="MAIL_ID",referencedColumnName="ID",nullable=false)
private MailBean mail;

it was working on hibernate 4.2.* to let it work on 4.3.5 i have to change
fetch=FetchType.EAGER to fetch=FetchType.Lazy , but what if i do not want change it to Lazy
,

is it a bug or something else , please advice ?

Regards
Wish79


Top
 Profile  
 
 Post subject: Re: Upgrading from JPA hibernate 4.2.* to 4.3.5 problem
PostPosted: Tue Nov 18, 2014 10:29 am 
Newbie

Joined: Tue Jun 25, 2013 6:52 am
Posts: 7
Hello All,
I solve the problem , when i upgrade the hibernate from 4.3.5 to 4.3.7 the problem disappear .

Thanks All
Wish79


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.