cache « Delete « JPA Q&A





1. Delete - one to many nullify - cache not invalidated    forum.hibernate.org

... User creatorUser = getHibernateTemplate().get(User.class, id1); User createdUser = getHibernateTemplate().get(User.class, id2); getHibernateTemplate().delete(creatorUser); //My database is ok, only 1 user, 'createdUser' with no creator assertNotNull(createdUser.getCreator()); //Ok creator is still not null as I didn't refetch from database. createdUser = getHibernateTemplate().get(User.class, id2); //No sql request has been sent ??!!! [b]assertNull(createdUser.getCreator());[/b] //Crash, creator is still not null.

2. Deleting collections and cache    forum.hibernate.org

Newbie Joined: Fri Sep 03, 2004 8:19 am Posts: 1 Hibernate version:2.1.4 Name and version of the database you are using: MS SQL Essential fragments of mapping documents: Code:

3. Is cached collection update when deleting object?    forum.hibernate.org

I've checked this problem. Hibernate doesn't automaticaly remove deleted objects from collections. In simple cases (deleting only one object) I can do it on my own but I use cascade delete in many places. Aftere delete when I try tu use collection (cached erlier) and when I attempt to get properties of deleted object I get this exception: net.sf.hibernate.ObjectNotFoundException How can ...

4. Proxies remain in cache after bulk delete?    forum.hibernate.org

5. deletes from database but keeps it in cache    forum.hibernate.org

Need help with Hibernate? Read this first: http://www.hibernate.org/ForumMailingli ... AskForHelp [b]Hibernate version:[/b] [b]Mapping documents:[/b] [b]Code between sessionFactory.openSession() and session.close():[/b] [b]Full stack trace of any exception that occurs:[/b] [b]Name and version of the database you are using:[/b] [b]The generated SQL (show_sql=true):[/b] [b]Debug level Hibernate log excerpt:[/b] Hi All I am experiencing a very weird behaviour from hibernate... I have a class and ...

6. Delete object + Cache issue    forum.hibernate.org

I have an Object say ProfileObject. Its hbm file contains the following tag now assuming this object is cached.If i delete this object through my code, the cache does not get updated.it still hows this object to be a part of it. but if i use then it gets removed from the cache also when i delete ...