Hi
I try to migrate a legacy application (on Kodo 3.4, develped over 10+ years).
I now created all needed plugins so our very much not JDO compliant code runs.
However, now that it works I have a massive performance problem. The problem is that datanucleus does not seem to use the foreign keys to check if the related object is already in the cache. That means if using datanucleus an order of magnitude more queries to the DB happen.
Example:We have Enterprise and Person. Person has a foreign key to Enterprise.If I load 2 Person from the same enterprise, p1 and p2 and then call p1.getEnterprise() it will load the enterprise from the DB.
If I then call p2.getEnterprise() it will again load the same Enterprise from the DB.
Kodo 3.4 will store the foreign key for related objects and then use that to lookup the object in the cache.
- Is there a way to make datanucleus store the foreign key and later use that to get the related object from cache?
- Can anybody say how much work it would be to make datanucleus do that?
Because with this problem I probably have to cancel the migration :(
Thanks and kind regards
Dirk