Hi there, I'm trying to establish a OneToMany relation from a Usr class towards an AddressList class and viceversa ManyToOne. My problem is on the mapped AddressList.user_fk, which should keep the reference, while instead is null ane returns an error from Hibernate:
javax.persistence.PersistenceException: org.hibernate.PropertyValueException: not-null property references a null or transient value: xx.xxxxx.xxx.UsrAddress.user_fk
you meant "user_fk" ?? I'm still getting the same error
avax.persistence.PersistenceException: org.hibernate.PropertyValueException: not-null property references a null or transient value: xx.xxxxxx.xxxxxxx.model.UsrAddress.user_fk
just wondering if the following way to instance the object on the client side may be the reason
It should be, because the other address property are correctly written if I omit the not null annotation. I'm a bit confused...
Another question, I've understood that mappedBy must refers to the property and not to the DB field, but why on the DB it comes out as user_fk_id, should this field be an integer? [ June 12, 2007: Message edited by: Alessandro Ilardo ]