Hibernate 2nd level cache one to many issue

So I'm working on a Java EE project which integrates Hibernate Ehache plugin for 2nd level cache support. One of the project's entities is not in cache on purpose (not a good candidate), let's name it "A". "A" has many relations with in-cache entites and it works fine : when I retrieve an instance of "A" from the db, its relation entities are retrieved from the cache as expected.

The problem is about a relation on "A" with itself (to model a tree). So the relation is "many to one". I...

Read More »

By: StackOverFlow - Monday, 16 April

Related Posts

  • Older News
  • Camel Cache Entry Info and Configuration StackOverFlow (3 days ago) - I have two questions about camel-cache (http://camel.apache.org/cache.html),When a get operation is performed, is there any way to get thecreation time of the entry or the duration it has on the...
  • how can i resolve it Exception in thread "main" org.hibernate.MappingException: Unknown entity StackOverFlow (3 days ago) - I am getting an exception in thread "main" org.hibernate.MappingException: Unknown entity: Exception in thread "main" org.hibernate.MappingException: Unknown entity: org.koushik.javabrains.dto.UserDetailsat org.hibernate.impl.SessionFactoryImpl.getEntityPersister(SessionFactoryImpl.java:693)at org.hibernate.impl.SessionImpl.getEntityPersister(SessionImpl.java:1485)at org.hibernate.event.def.AbstractSaveEventListener.saveWithGeneratedId(AbstractSaveEventListener.java:120)at org.hibernate.event.def.DefaultSaveOrUpdateEventListener.saveWithGeneratedOrRequestedId(DefaultSaveOrUpdateEventListener.java:210)at org.hibernate.event.def.DefaultSaveEventListener.saveWithGeneratedOrRequestedId(DefaultSaveEventListener.java:56)at org.hibernate.event.def.DefaultSaveOrUpdateEventListener.entityIsTransient(DefaultSaveOrUpdateEventListener.java:195)at org.hibernate.event.def.DefaultSaveEventListener.performSaveOrUpdate(DefaultSaveEventListener.java:50)at org.hibernate.event.def.DefaultSaveOrUpdateEventListener.onSaveOrUpdate(DefaultSaveOrUpdateEventListener.java:93)at org.hibernate.impl.SessionImpl.fireSave(SessionImpl.java:713)at org.hibernate.impl.SessionImpl.save(SessionImpl.java:701)at org.hibernate.impl.SessionImpl.save(SessionImpl.java:697)at...