refresh « Load « JPA Q&A





1. Hibernate refresh?    stackoverflow.com

I am working with hibernate and mysql to abstract a database for use in a java driven website. I got all my queries to work out just fine using hibernate, but ...

2. Refresh Not Loading Collections    forum.hibernate.org

Figured it out. Had to load the account first before refreshing. Makes sense, but is certainly not intuitive to a new user. I tried using session.load(account.class, accountId) before I discovered refresh, only to find out that load() does not load associated collections. Why? Then I tried using an example criteria only to find out that example criteria ignore id properties, so ...

3. session load/refresh return object which is not instantiated    forum.hibernate.org

I'm trying to (eagerly) load user object (with all its internal collections & paramerts), modify it, save it to DB, and then refresh the object - so I can return an updated user object to the client. The problem: in the code below both load() & refresh() return user object with all user's internal data as null (See the code below) ...

4. Shouldn't load have the same effect as refresh    forum.hibernate.org

Hi But I'm getting the exception when I load the object. For example: PersistantItem item; item = new PersistantItem (); item.setValue ("Whatever"); session.save (); item = (Item) session.load (PersistantItem.class, item.getId ()); When I do setValue I create a new CLOB object with that value. The exception is thrown in session.load. Shouldn't "load" have the same effect as "refresh"??? Thanks

5. Lazy collection load with cascade refresh issue    forum.hibernate.org

Newbie Joined: Sun Apr 03, 2005 9:52 pm Posts: 1 Hello! I have a trouble using lazy collection loading with cascase refresh relationship. The collection of objects does not session.refresh correctly after modification in scope of one session. Furthermore if i surround session.refresh call with transaction when Hibernate stores any modifications of collection's objects i have made. Hibernate version: 3.0 Mapping ...

6. refresh and lazy loading    forum.hibernate.org

Since I migrate from Hibernate 2.1.7 to 3.1.3, I have problems with refresh. I have noticed that refresh behavior have changed (migration note) : - in 2.1.7, it refreshed only the object - in 3.1.3, it refresh all the object graph It seems that the refresh operate also on lazy collections even if they wasn't initialized before refresh. Is it normal ...

7. Problem with refresh() when have lazily loaded objects    forum.hibernate.org

Hi Hibernate 3.2.6 Spring 2.5.6 Java 1.4 Oracle 9.2 Im getting a NullPointer exception thrown out of EvictVisitor.evictCollection() when calling session.refresh() on a persistent object. That object contains a lazily loaded object within it (mapped as many-to-one with cascade='all') and that object has a collection within it (mapped as a set with cascade='all-delete-orphan'). There is persistent data for the lazily loaded ...