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
|