-
1. Re: Problem with one-to-many assotiations in Hibernate with
brian.stansberry Nov 29, 2007 2:49 PM (in response to johnbat26)Please take this up on the hibernate forums until you can establish that your issue is caused by JBoss Cache itself. Hibernate controls what is stored in the 2nd level cache and whether the cached MovieCategory.movies collection gets invalidated out of the cache when you change a Movie. JBC just does what it's told to do by Hibernate.
Suggestions for getting good free help w/ open source software -- discuss on forums before filing bug reports; don't mark your reports as "Critical" but let the developers make that determination, and don't say stuff like "Please, help me! This problem is critical for me !". Unless of course you want to buy a support contract, in which case you can do all these things and we won't complain at all. ;-) -
2. Re: Problem with one-to-many assotiations in Hibernate with
johnbat26 Nov 29, 2007 3:21 PM (in response to johnbat26)Thanks for quick answer !
I long explore log of Hibernate and, to my mind, JBoss Cache work properly!
But !
Why whereupon without cache all work OK ?
If take a look at log in JIRA, then JBoss cache FIX CACHE MISS!
And Hibernate reassign FOREIGN KEY at Movie.
But cache at Movie Category don't fresh ?!?!
I don't understand nothing ((( -
3. Re: Problem with one-to-many assotiations in Hibernate with
brian.stansberry Nov 29, 2007 4:02 PM (in response to johnbat26)If take a look at log in JIRA, then JBoss cache FIX CACHE MISS!
Not sure what you mean here.
And Hibernate reassign FOREIGN KEY at Movie.
But cache at Movie Category don't fresh ?!?!
JBoss Cache doesn't somehow automatically change what's cached when a Movie's foreign key changes -- it's up to Hibernate's 2nd level cache management code to tell it to do that. That's why I say you need to discuss this on the Hibernate forums -- the Hibernate developers are the ones who understand when they refresh the cache. JBC just stores what it is told to store.
Imagine Hibernate supported using a java.util.HashMap as a 2nd level cache. If you were having this problem, you wouldn't go to your JRE vendor to find out why the HashMap contents are not what you expect. You'd start by discussing the problem with the Hibernate folks. -
4. Re: Problem with one-to-many assotiations in Hibernate with
gunash55in Dec 18, 2007 2:54 AM (in response to johnbat26)may be use lazy="false" in your <Many-to-One > and that should be applicable for child ..