You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@openjpa.apache.org by "Rick Curtis (JIRA)" <ji...@apache.org> on 2010/08/19 16:33:15 UTC
[jira] Created: (OPENJPA-1770) Inconsistent behaviour when fetching
an Entity that has a null embeddable and the DataCache is enabled
Inconsistent behaviour when fetching an Entity that has a null embeddable and the DataCache is enabled
------------------------------------------------------------------------------------------------------
Key: OPENJPA-1770
URL: https://issues.apache.org/jira/browse/OPENJPA-1770
Project: OpenJPA
Issue Type: Bug
Affects Versions: 2.1.0
Reporter: Rick Curtis
Assignee: Rick Curtis
While investigating the failures for OPENJPA-1469 I found that when the DataCache is enabled we behave differently when finding an Entity that has an empty/null embeddable. Take the following domain model:
@Entity
class A{
@Id
int id;
@Embeddable
Emb emb;
...
}
@Embeddable
class Emb{
....
}
The scenario where this is observed is when the datacache is not enabled and I persist Entity [A] with a null Emb. In a new persistence context I search for that same Entity, Emb is now an empty embeddable. In that same case when the datacache is enabled the find operation returns an Entity with a null embeddable. This is because the DataCache knows that Emb is null, when the data is retrieved from the database we don't know if it should be null or empty.
The datacache behavior is probably more correct, but it is inconsistent with the non-datacache behavior. Since the datacache is supposed to be transparent to the application I am going to make this two cases operate in the same manner. I asked posted this observation to the dev mailing list[1] but didn't receive any responses.
[1] http://openjpa.markmail.org/thread/xyytunrvcciv5ura
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Updated: (OPENJPA-1770) Inconsistent behaviour when fetching
an Entity that has a null embeddable and the DataCache is enabled
Posted by "Rick Curtis (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/OPENJPA-1770?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Rick Curtis updated OPENJPA-1770:
---------------------------------
Fix Version/s: 2.1.0
Affects Version/s: 2.0.0
Component/s: datacache
kernel
> Inconsistent behaviour when fetching an Entity that has a null embeddable and the DataCache is enabled
> ------------------------------------------------------------------------------------------------------
>
> Key: OPENJPA-1770
> URL: https://issues.apache.org/jira/browse/OPENJPA-1770
> Project: OpenJPA
> Issue Type: Bug
> Components: datacache, kernel
> Affects Versions: 2.0.0, 2.1.0
> Reporter: Rick Curtis
> Assignee: Rick Curtis
> Fix For: 2.1.0
>
> Attachments: OPENJPA-1770.patch
>
>
> While investigating the failures for OPENJPA-1469 I found that when the DataCache is enabled we behave differently when finding an Entity that has an empty/null embeddable. Take the following domain model:
> @Entity
> class A{
> @Id
> int id;
> @Embeddable
> Emb emb;
> ...
> }
> @Embeddable
> class Emb{
> ....
> }
> The scenario where this is observed is when the datacache is not enabled and I persist Entity [A] with a null Emb. In a new persistence context I search for that same Entity, Emb is now an empty embeddable. In that same case when the datacache is enabled the find operation returns an Entity with a null embeddable. This is because the DataCache knows that Emb is null, when the data is retrieved from the database we don't know if it should be null or empty.
> The datacache behavior is probably more correct, but it is inconsistent with the non-datacache behavior. Since the datacache is supposed to be transparent to the application I am going to make this two cases operate in the same manner. I asked posted this observation to the dev mailing list[1] but didn't receive any responses.
> [1] http://openjpa.markmail.org/thread/xyytunrvcciv5ura
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Updated: (OPENJPA-1770) Inconsistent behaviour when fetching
an Entity that has a null embeddable and the DataCache is enabled
Posted by "Rick Curtis (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/OPENJPA-1770?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Rick Curtis updated OPENJPA-1770:
---------------------------------
Attachment: OPENJPA-1770.patch
> Inconsistent behaviour when fetching an Entity that has a null embeddable and the DataCache is enabled
> ------------------------------------------------------------------------------------------------------
>
> Key: OPENJPA-1770
> URL: https://issues.apache.org/jira/browse/OPENJPA-1770
> Project: OpenJPA
> Issue Type: Bug
> Components: datacache, kernel
> Affects Versions: 2.0.0, 2.1.0
> Reporter: Rick Curtis
> Assignee: Rick Curtis
> Fix For: 2.1.0
>
> Attachments: OPENJPA-1770.patch
>
>
> While investigating the failures for OPENJPA-1469 I found that when the DataCache is enabled we behave differently when finding an Entity that has an empty/null embeddable. Take the following domain model:
> @Entity
> class A{
> @Id
> int id;
> @Embeddable
> Emb emb;
> ...
> }
> @Embeddable
> class Emb{
> ....
> }
> The scenario where this is observed is when the datacache is not enabled and I persist Entity [A] with a null Emb. In a new persistence context I search for that same Entity, Emb is now an empty embeddable. In that same case when the datacache is enabled the find operation returns an Entity with a null embeddable. This is because the DataCache knows that Emb is null, when the data is retrieved from the database we don't know if it should be null or empty.
> The datacache behavior is probably more correct, but it is inconsistent with the non-datacache behavior. Since the datacache is supposed to be transparent to the application I am going to make this two cases operate in the same manner. I asked posted this observation to the dev mailing list[1] but didn't receive any responses.
> [1] http://openjpa.markmail.org/thread/xyytunrvcciv5ura
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Resolved: (OPENJPA-1770) Inconsistent behaviour when
fetching an Entity that has a null embeddable and the DataCache is enabled
Posted by "Rick Curtis (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/OPENJPA-1770?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Rick Curtis resolved OPENJPA-1770.
----------------------------------
Resolution: Fixed
Committed revision 987321 to trunk.
> Inconsistent behaviour when fetching an Entity that has a null embeddable and the DataCache is enabled
> ------------------------------------------------------------------------------------------------------
>
> Key: OPENJPA-1770
> URL: https://issues.apache.org/jira/browse/OPENJPA-1770
> Project: OpenJPA
> Issue Type: Bug
> Components: datacache, kernel
> Affects Versions: 2.0.0, 2.1.0
> Reporter: Rick Curtis
> Assignee: Rick Curtis
> Fix For: 2.1.0
>
> Attachments: OPENJPA-1770.patch
>
>
> While investigating the failures for OPENJPA-1469 I found that when the DataCache is enabled we behave differently when finding an Entity that has an empty/null embeddable. Take the following domain model:
> @Entity
> class A{
> @Id
> int id;
> @Embeddable
> Emb emb;
> ...
> }
> @Embeddable
> class Emb{
> ....
> }
> The scenario where this is observed is when the datacache is not enabled and I persist Entity [A] with a null Emb. In a new persistence context I search for that same Entity, Emb is now an empty embeddable. In that same case when the datacache is enabled the find operation returns an Entity with a null embeddable. This is because the DataCache knows that Emb is null, when the data is retrieved from the database we don't know if it should be null or empty.
> The datacache behavior is probably more correct, but it is inconsistent with the non-datacache behavior. Since the datacache is supposed to be transparent to the application I am going to make this two cases operate in the same manner. I asked posted this observation to the dev mailing list[1] but didn't receive any responses.
> [1] http://openjpa.markmail.org/thread/xyytunrvcciv5ura
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.