StatelessSession « Insert « JPA Q&A





1. Problem with StatelessSession insert    forum.hibernate.org

Hello, I have a strange problem with StatelessSession, if anyone can help me. Basically, what happens to me, is that, records inserted via StatelessSession insert, are not visible when I query for them, via regular Session. I know that StatelessSession bypasses normal hibernate functionality, however I find it strange, that I cannot get those records, no matter what I do. Please ...

2. StatelessSession.insert: UnsupportedOperationException    forum.hibernate.org

Hibernate version: 3.1.3 Hello, I have a class A with a many-to-one reference to class B. An instance b of Class B is retrieved through a normal session. Now I create a new instance a of A, call a.setB(b), then call StatelessSession.insert(a); The result is an UnsupportedOperationException: java.lang.UnsupportedOperationException at org.hibernate.impl.StatelessSessionImpl.getTimestamp(StatelessSessionImpl.java:268) at org.hibernate.persister.entity.AbstractEntityPersister.isTransient(AbstractEntityPersister.java:3016) at .... If I retrieve the instance of class ...