The findBy behaves differently when DataCache is on in some situations.
-----------------------------------------------------------------------
Key: OPENJPA-611
URL: https://issues.apache.org/jira/browse/OPENJPA-611
Project: OpenJPA
Issue Type: Bug
Reporter: Fay Wang
In the following two situations, the behavior of findBy with DataCache on is
different from the same findBy with DataCache off:
(1) When there is @PrimaryKeyJoinColumn annotation on the relation fields:
Even though no relation is explicitly set in the application, when retrieving
from the database, the relation field will be populated. However, if DataCache
is on, the relation fields will not be populated via findBy from data cache.
(2) When more than one fields are mapped to the same column with
insertable=false or updateable=false: Setting different values to these fields
will be saved in and restored from the datacache, but the the database will
return only one value for these fields.
The attached patch detects the above two situations and set the flag to
instruct DataCacheStoreManager not to cache the instances of these kinds of
entities so that the findBy operation for these two kinds of entities will
always go to the database.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.