Date 1 - 2 of 2
Evict parent class from Query Results Cache at commit
I hope you can help with this issue. I have a simple inheritance of these two classes.
I've got them mapped like this
with subclass-table inheritence strategy. Also I have query results cache enabled in my datanucleus.properties
Then in my code I have 2 services classes, one for BasePlayer class which is BasePlayerService where I'm making a select query to retrieve all the players in the database, the other one is for Player which is PlayerService where I'm making a insert of the Player.
The 1st list of users shows all the 6 records saved in my database, but when I insert a new Player, the 2nd list shows the same 6 records, but in fact another Player was saved in the database, so the second list should list a total of 7 Players
This is the code from my BasePlayerService
And this is the code of my PlayerService class for saving a new Player
I know that In the BasePlayerService I'm using the class BasePlayer and in the PlayerService I'm using the Player class and I also know that any query related to Player class is evicted from Query Results Cache once the commit is executed.
My question is if there is a way to tell datanucleus to evict the results related to the parent class BasePlayer too, because the first list query is being cached and it's not cleared from Query Results Cache.
I hope you can help me.
If there is any other information you need to understand the issue better, please write me!
Thanks a lot!
The docs https://www.datanucleus.org/products/accessplatform_6_0/jdo/query.html#cache_results describes how you can gain access to internal objects and hence evict particular things should you need to
|1 - 2 of 2|