Hello,
I have declared a <natural-id .../> that includes a <many-to-one .../> relation. I'm trying to use it in my Dao but I'm getting an org.springframework.dao.InvalidDataAccessApiUsageException: org.blah.Owner; nested exception is org.hibernate.TransientObjectException: org.blah.Owner
My test is: Case case = new Case(new Owner("me"), ...); assertNull(dao.findByNaturalKey(case));
The findByNaturalKey is: NaturalIdentifier naturalId = Restrictions.naturalId(); naturalId.set("owner", case.getOwner());
It works for the other natural keys, how do I include the owner?
Thanks
|