1

I am using TreeCache as my hibernate second level entity cache. I have an entity hierarchy which contains Customers and Partners both extend from Users. Can I cache Partner only ? I can cache Users then both customers and parers getting cached as well. But I want to cache a selected sub type. I am using a single table per class hierarchy strategy to store data .(single table with discriminator column). Appreciate your help.

Thanks

Regards,

Era

era
  • 391
  • 4
  • 24
  • What happens if you try doing it? – JB Nizet Jul 31 '12 at 07:52
  • In hibernate mapping can not specify under element. If I do so I am getting a runtime error saying "Could not parse mapping document from invalid mapping". But can specify under element. – era Jul 31 '12 at 08:56

1 Answers1

0

Not really sure but you may have issues with chosen inheritance strategy, see: - http://forums.terracotta.org/forums/posts/list/4849.page - http://forums.terracotta.org/forums/posts/list/15/4849.page - https://forum.hibernate.org/viewtopic.php?f=1&t=937742

Regards Philippe

  • It seems can not cache the sub entities without root entity. Caching need to initiate from the root entity. Can you suggest me a way to support sub type caching ? Any possible code hacking ? – era Jul 31 '12 at 08:21