Sunday, December 21, 2014

org.hibernate.LazyInitializationException - could not initialize proxy exception. in getId of an entity

I'm working with hibernate and I want to check if an object is persist or not so i use the getId method to check it's value. but as the object is not from this session I get the exception org.hibernate.LazyInitializationException - could not initialize proxy . how else can I understand this? note that id is the primary key of my object and as far as I know it shouldn't be lazy!!


No comments:

Post a Comment