You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@openjpa.apache.org by "Milosz Tylenda (JIRA)" <ji...@apache.org> on 2008/12/18 22:11:44 UTC
[jira] Created: (OPENJPA-834) State field mapped to XML column has
incorrect value when loaded from database
State field mapped to XML column has incorrect value when loaded from database
------------------------------------------------------------------------------
Key: OPENJPA-834
URL: https://issues.apache.org/jira/browse/OPENJPA-834
Project: OpenJPA
Issue Type: Bug
Components: kernel
Affects Versions: 1.3.0, 2.0.0
Environment: Database with XML column support
Reporter: Milosz Tylenda
The org.apache.openjpa.persistence.xmlmapping.xmlbindings.myaddress.Address is a class with JAXB annotations. It has a property street of type List<String>. When an entity containing Address in its state field is loaded from database, the street property is empty.
My initial investigation led me to a conclusion that the issue is caused by a proxy returned from ProxyManagerImpl.newCustomProxy(Object) which does not behave correctly.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (OPENJPA-834) State field mapped to XML column
has incorrect value when loaded from database
Posted by "Catalina Wei (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/OPENJPA-834?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12664282#action_12664282 ]
Catalina Wei commented on OPENJPA-834:
--------------------------------------
Milosz,
Thanks for the patch.
Do you mind documenting the XJC plug-ins that generate the setters for collections in our Manual - the xmlmapping section ?
The issue remains open until proper documentation is in place.
Thank you for the work.
> State field mapped to XML column has incorrect value when loaded from database
> ------------------------------------------------------------------------------
>
> Key: OPENJPA-834
> URL: https://issues.apache.org/jira/browse/OPENJPA-834
> Project: OpenJPA
> Issue Type: Bug
> Components: kernel
> Affects Versions: 1.3.0, 2.0.0
> Environment: Database with XML column support
> Reporter: Milosz Tylenda
> Attachments: OPENJPA-834.patch
>
>
> The org.apache.openjpa.persistence.xmlmapping.xmlbindings.myaddress.Address is a class with JAXB annotations. It has a property street of type List<String>. When an entity containing Address in its state field is loaded from database, the street property is empty.
> My initial investigation led me to a conclusion that the issue is caused by a proxy returned from ProxyManagerImpl.newCustomProxy(Object) which does not behave correctly.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Resolved: (OPENJPA-834) State field mapped to XML column has
incorrect value when loaded from database
Posted by "Catalina Wei (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/OPENJPA-834?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Catalina Wei resolved OPENJPA-834.
----------------------------------
Resolution: Fixed
Fix Version/s: 2.0.0
1.3.0
Updates to the manual has been provided by Milosz Tylenda and committed under following revisions:
trunk: - r737799
1.3.x - r737801
> State field mapped to XML column has incorrect value when loaded from database
> ------------------------------------------------------------------------------
>
> Key: OPENJPA-834
> URL: https://issues.apache.org/jira/browse/OPENJPA-834
> Project: OpenJPA
> Issue Type: Bug
> Components: kernel
> Affects Versions: 1.3.0, 2.0.0
> Environment: Database with XML column support
> Reporter: Milosz Tylenda
> Fix For: 1.3.0, 2.0.0
>
> Attachments: OPENJPA-834.patch
>
>
> The org.apache.openjpa.persistence.xmlmapping.xmlbindings.myaddress.Address is a class with JAXB annotations. It has a property street of type List<String>. When an entity containing Address in its state field is loaded from database, the street property is empty.
> My initial investigation led me to a conclusion that the issue is caused by a proxy returned from ProxyManagerImpl.newCustomProxy(Object) which does not behave correctly.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Updated: (OPENJPA-834) State field mapped to XML column has
incorrect value when loaded from database
Posted by "Milosz Tylenda (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/OPENJPA-834?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Milosz Tylenda updated OPENJPA-834:
-----------------------------------
Attachment: OPENJPA-834.patch
The patch adds a setter for the street property. If applying the patch, please remove the @AllowFailure from the test case.
> State field mapped to XML column has incorrect value when loaded from database
> ------------------------------------------------------------------------------
>
> Key: OPENJPA-834
> URL: https://issues.apache.org/jira/browse/OPENJPA-834
> Project: OpenJPA
> Issue Type: Bug
> Components: kernel
> Affects Versions: 1.3.0, 2.0.0
> Environment: Database with XML column support
> Reporter: Milosz Tylenda
> Attachments: OPENJPA-834.patch
>
>
> The org.apache.openjpa.persistence.xmlmapping.xmlbindings.myaddress.Address is a class with JAXB annotations. It has a property street of type List<String>. When an entity containing Address in its state field is loaded from database, the street property is empty.
> My initial investigation led me to a conclusion that the issue is caused by a proxy returned from ProxyManagerImpl.newCustomProxy(Object) which does not behave correctly.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (OPENJPA-834) State field mapped to XML column
has incorrect value when loaded from database
Posted by "Milosz Tylenda (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/OPENJPA-834?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12664215#action_12664215 ]
Milosz Tylenda commented on OPENJPA-834:
----------------------------------------
The XJC generator can be forced to generate setters for collections by using a plug-in [1]. The manual could be updated with that information.
[1] https://jaxb2-commons.dev.java.net/collection-setter-injector/
> State field mapped to XML column has incorrect value when loaded from database
> ------------------------------------------------------------------------------
>
> Key: OPENJPA-834
> URL: https://issues.apache.org/jira/browse/OPENJPA-834
> Project: OpenJPA
> Issue Type: Bug
> Components: kernel
> Affects Versions: 1.3.0, 2.0.0
> Environment: Database with XML column support
> Reporter: Milosz Tylenda
> Attachments: OPENJPA-834.patch
>
>
> The org.apache.openjpa.persistence.xmlmapping.xmlbindings.myaddress.Address is a class with JAXB annotations. It has a property street of type List<String>. When an entity containing Address in its state field is loaded from database, the street property is empty.
> My initial investigation led me to a conclusion that the issue is caused by a proxy returned from ProxyManagerImpl.newCustomProxy(Object) which does not behave correctly.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (OPENJPA-834) State field mapped to XML column
has incorrect value when loaded from database
Posted by "Milosz Tylenda (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/OPENJPA-834?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12658057#action_12658057 ]
Milosz Tylenda commented on OPENJPA-834:
----------------------------------------
Heh, the issue is simpler - the Address class needs a setter for the street property. Otherwise ProxyBean.newInstance(Object) will not copy that property.
I will send a patch soon.
> State field mapped to XML column has incorrect value when loaded from database
> ------------------------------------------------------------------------------
>
> Key: OPENJPA-834
> URL: https://issues.apache.org/jira/browse/OPENJPA-834
> Project: OpenJPA
> Issue Type: Bug
> Components: kernel
> Affects Versions: 1.3.0, 2.0.0
> Environment: Database with XML column support
> Reporter: Milosz Tylenda
>
> The org.apache.openjpa.persistence.xmlmapping.xmlbindings.myaddress.Address is a class with JAXB annotations. It has a property street of type List<String>. When an entity containing Address in its state field is loaded from database, the street property is empty.
> My initial investigation led me to a conclusion that the issue is caused by a proxy returned from ProxyManagerImpl.newCustomProxy(Object) which does not behave correctly.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (OPENJPA-834) State field mapped to XML column
has incorrect value when loaded from database
Posted by "Milosz Tylenda (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/OPENJPA-834?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12664461#action_12664461 ]
Milosz Tylenda commented on OPENJPA-834:
----------------------------------------
Catalina,
I will provide a patch for the manual.
> State field mapped to XML column has incorrect value when loaded from database
> ------------------------------------------------------------------------------
>
> Key: OPENJPA-834
> URL: https://issues.apache.org/jira/browse/OPENJPA-834
> Project: OpenJPA
> Issue Type: Bug
> Components: kernel
> Affects Versions: 1.3.0, 2.0.0
> Environment: Database with XML column support
> Reporter: Milosz Tylenda
> Attachments: OPENJPA-834.patch
>
>
> The org.apache.openjpa.persistence.xmlmapping.xmlbindings.myaddress.Address is a class with JAXB annotations. It has a property street of type List<String>. When an entity containing Address in its state field is loaded from database, the street property is empty.
> My initial investigation led me to a conclusion that the issue is caused by a proxy returned from ProxyManagerImpl.newCustomProxy(Object) which does not behave correctly.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.