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 21:57:44 UTC
[jira] Created: (OPENJPA-833) An improved test case for XML column
mapping
An improved test case for XML column mapping
--------------------------------------------
Key: OPENJPA-833
URL: https://issues.apache.org/jira/browse/OPENJPA-833
Project: OpenJPA
Issue Type: Test
Components: sql
Affects Versions: 1.3.0, 2.0.0
Reporter: Milosz Tylenda
Priority: Minor
Attachments: OPENJPA-833.patch
1. The current version of TestXMLCustomerOrder does not use assert methods
requiring programmer to watch the results on the screen. It also fails to
correctly determine whether some dictionaries support XML column.
2. The patched version does roughly the same tests but uses asserts methods
like other JUnit tests.
3. In order to correctly determine XML support, an EnitityManager is created
so that the DBDictionary executes its connectedConfiguration method. Let me
know if there is a better method for doing this.
4. I know the original idea with the current version was to catch the generated
SQL and compare it with one saved in a file. It was not done, only the SQL
is logged to a file and there are three files in the repository with
database specific SQL. I abandoned this approach as I find comparing SQL
strings too vulnerable to subtle changes in other areas of OpenJPA (e.g
column ordering, alias names). On the other hand I found the generated SQL
files very helpful to get familiar with how the XML support is done. So, I
removed the SQL logging but the patch contains a file with some queries
executed against PostgreSQL. Let me know if this removing of SQL logging or
adding new file is not desired.
5. I have found out that filling a List property in entity does not work. I
have annotated the respective test with @AllowFailure. I will file a
separate issue for this.
6. As in the current version, there are three queries that are expected to
fail.
7. Since running the test requires an JAXB implementation (not only the JAXB
API), I have added Sun's JAXB implementation to openjpa-jdbc/pom.xml
with runtime scope and also to the main pom.xml to specify the version.
I chose 2.0.5 as I found it the newset from the 2.0 line.
8. Since XML column mapping requires a newer PostgreSQL JDBC driver I have
upgraded the version in openjpa-jdbc/pom.xml and
openjpa-persistence-jdbc/pom.xml.
9. I welcome comments and suggestions.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (OPENJPA-833) An improved test case for XML
column mapping
Posted by "Catalina Wei (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/OPENJPA-833?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12658990#action_12658990 ]
Catalina Wei commented on OPENJPA-833:
--------------------------------------
Milosz,
It is greatly appreciated that you improved the xmlmapping testcase and fix-up the jaxb dependencies.
I will commit your patch.
Please do file a separate issue for @AllowFailure testcase.
It seems to me a JAXB unmarshal() bug.
Thanks.
> An improved test case for XML column mapping
> --------------------------------------------
>
> Key: OPENJPA-833
> URL: https://issues.apache.org/jira/browse/OPENJPA-833
> Project: OpenJPA
> Issue Type: Test
> Components: sql
> Affects Versions: 1.3.0, 2.0.0
> Reporter: Milosz Tylenda
> Priority: Minor
> Attachments: OPENJPA-833.patch, TestXMLCustomerOrder.java, TestXMLCustomerOrder.postgres
>
>
> 1. The current version of TestXMLCustomerOrder does not use assert methods
> requiring programmer to watch the results on the screen. It also fails to
> correctly determine whether some dictionaries support XML column.
> 2. The patched version does roughly the same tests but uses asserts methods
> like other JUnit tests.
> 3. In order to correctly determine XML support, an EnitityManager is created
> so that the DBDictionary executes its connectedConfiguration method. Let me
> know if there is a better method for doing this.
> 4. I know the original idea with the current version was to catch the generated
> SQL and compare it with one saved in a file. It was not done, only the SQL
> is logged to a file and there are three files in the repository with
> database specific SQL. I abandoned this approach as I find comparing SQL
> strings too vulnerable to subtle changes in other areas of OpenJPA (e.g
> column ordering, alias names). On the other hand I found the generated SQL
> files very helpful to get familiar with how the XML support is done. So, I
> removed the SQL logging but the patch contains a file with some queries
> executed against PostgreSQL. Let me know if this removing of SQL logging or
> adding new file is not desired.
> 5. I have found out that filling a List property in entity does not work. I
> have annotated the respective test with @AllowFailure. I will file a
> separate issue for this.
> 6. As in the current version, there are three queries that are expected to
> fail.
> 7. Since running the test requires an JAXB implementation (not only the JAXB
> API), I have added Sun's JAXB implementation to openjpa-jdbc/pom.xml
> with runtime scope and also to the main pom.xml to specify the version.
> I chose 2.0.5 as I found it the newset from the 2.0 line.
> 8. Since XML column mapping requires a newer PostgreSQL JDBC driver I have
> upgraded the version in openjpa-jdbc/pom.xml and
> openjpa-persistence-jdbc/pom.xml.
> 9. I welcome comments and suggestions.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Updated: (OPENJPA-833) An improved test case for XML column
mapping
Posted by "Milosz Tylenda (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/OPENJPA-833?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Milosz Tylenda updated OPENJPA-833:
-----------------------------------
Attachment: TestXMLCustomerOrder.postgres
It appears that "svn diff" doesn't include new files - attached a new file which should go together with the patch.
> An improved test case for XML column mapping
> --------------------------------------------
>
> Key: OPENJPA-833
> URL: https://issues.apache.org/jira/browse/OPENJPA-833
> Project: OpenJPA
> Issue Type: Test
> Components: sql
> Affects Versions: 1.3.0, 2.0.0
> Reporter: Milosz Tylenda
> Priority: Minor
> Attachments: OPENJPA-833.patch, TestXMLCustomerOrder.java, TestXMLCustomerOrder.postgres
>
>
> 1. The current version of TestXMLCustomerOrder does not use assert methods
> requiring programmer to watch the results on the screen. It also fails to
> correctly determine whether some dictionaries support XML column.
> 2. The patched version does roughly the same tests but uses asserts methods
> like other JUnit tests.
> 3. In order to correctly determine XML support, an EnitityManager is created
> so that the DBDictionary executes its connectedConfiguration method. Let me
> know if there is a better method for doing this.
> 4. I know the original idea with the current version was to catch the generated
> SQL and compare it with one saved in a file. It was not done, only the SQL
> is logged to a file and there are three files in the repository with
> database specific SQL. I abandoned this approach as I find comparing SQL
> strings too vulnerable to subtle changes in other areas of OpenJPA (e.g
> column ordering, alias names). On the other hand I found the generated SQL
> files very helpful to get familiar with how the XML support is done. So, I
> removed the SQL logging but the patch contains a file with some queries
> executed against PostgreSQL. Let me know if this removing of SQL logging or
> adding new file is not desired.
> 5. I have found out that filling a List property in entity does not work. I
> have annotated the respective test with @AllowFailure. I will file a
> separate issue for this.
> 6. As in the current version, there are three queries that are expected to
> fail.
> 7. Since running the test requires an JAXB implementation (not only the JAXB
> API), I have added Sun's JAXB implementation to openjpa-jdbc/pom.xml
> with runtime scope and also to the main pom.xml to specify the version.
> I chose 2.0.5 as I found it the newset from the 2.0 line.
> 8. Since XML column mapping requires a newer PostgreSQL JDBC driver I have
> upgraded the version in openjpa-jdbc/pom.xml and
> openjpa-persistence-jdbc/pom.xml.
> 9. I welcome comments and suggestions.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Resolved: (OPENJPA-833) An improved test case for XML column
mapping
Posted by "Catalina Wei (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/OPENJPA-833?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Catalina Wei resolved OPENJPA-833.
----------------------------------
Resolution: Fixed
Fix Version/s: 2.0.0
1.3.0
> An improved test case for XML column mapping
> --------------------------------------------
>
> Key: OPENJPA-833
> URL: https://issues.apache.org/jira/browse/OPENJPA-833
> Project: OpenJPA
> Issue Type: Test
> Components: sql
> Affects Versions: 1.3.0, 2.0.0
> Reporter: Milosz Tylenda
> Priority: Minor
> Fix For: 1.3.0, 2.0.0
>
> Attachments: OPENJPA-833.patch, TestXMLCustomerOrder.java, TestXMLCustomerOrder.postgres
>
>
> 1. The current version of TestXMLCustomerOrder does not use assert methods
> requiring programmer to watch the results on the screen. It also fails to
> correctly determine whether some dictionaries support XML column.
> 2. The patched version does roughly the same tests but uses asserts methods
> like other JUnit tests.
> 3. In order to correctly determine XML support, an EnitityManager is created
> so that the DBDictionary executes its connectedConfiguration method. Let me
> know if there is a better method for doing this.
> 4. I know the original idea with the current version was to catch the generated
> SQL and compare it with one saved in a file. It was not done, only the SQL
> is logged to a file and there are three files in the repository with
> database specific SQL. I abandoned this approach as I find comparing SQL
> strings too vulnerable to subtle changes in other areas of OpenJPA (e.g
> column ordering, alias names). On the other hand I found the generated SQL
> files very helpful to get familiar with how the XML support is done. So, I
> removed the SQL logging but the patch contains a file with some queries
> executed against PostgreSQL. Let me know if this removing of SQL logging or
> adding new file is not desired.
> 5. I have found out that filling a List property in entity does not work. I
> have annotated the respective test with @AllowFailure. I will file a
> separate issue for this.
> 6. As in the current version, there are three queries that are expected to
> fail.
> 7. Since running the test requires an JAXB implementation (not only the JAXB
> API), I have added Sun's JAXB implementation to openjpa-jdbc/pom.xml
> with runtime scope and also to the main pom.xml to specify the version.
> I chose 2.0.5 as I found it the newset from the 2.0 line.
> 8. Since XML column mapping requires a newer PostgreSQL JDBC driver I have
> upgraded the version in openjpa-jdbc/pom.xml and
> openjpa-persistence-jdbc/pom.xml.
> 9. I welcome comments and suggestions.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Updated: (OPENJPA-833) An improved test case for XML column
mapping
Posted by "Milosz Tylenda (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/OPENJPA-833?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Milosz Tylenda updated OPENJPA-833:
-----------------------------------
Attachment: TestXMLCustomerOrder.java
Attached a plain source of the test also.
> An improved test case for XML column mapping
> --------------------------------------------
>
> Key: OPENJPA-833
> URL: https://issues.apache.org/jira/browse/OPENJPA-833
> Project: OpenJPA
> Issue Type: Test
> Components: sql
> Affects Versions: 1.3.0, 2.0.0
> Reporter: Milosz Tylenda
> Priority: Minor
> Attachments: OPENJPA-833.patch, TestXMLCustomerOrder.java
>
>
> 1. The current version of TestXMLCustomerOrder does not use assert methods
> requiring programmer to watch the results on the screen. It also fails to
> correctly determine whether some dictionaries support XML column.
> 2. The patched version does roughly the same tests but uses asserts methods
> like other JUnit tests.
> 3. In order to correctly determine XML support, an EnitityManager is created
> so that the DBDictionary executes its connectedConfiguration method. Let me
> know if there is a better method for doing this.
> 4. I know the original idea with the current version was to catch the generated
> SQL and compare it with one saved in a file. It was not done, only the SQL
> is logged to a file and there are three files in the repository with
> database specific SQL. I abandoned this approach as I find comparing SQL
> strings too vulnerable to subtle changes in other areas of OpenJPA (e.g
> column ordering, alias names). On the other hand I found the generated SQL
> files very helpful to get familiar with how the XML support is done. So, I
> removed the SQL logging but the patch contains a file with some queries
> executed against PostgreSQL. Let me know if this removing of SQL logging or
> adding new file is not desired.
> 5. I have found out that filling a List property in entity does not work. I
> have annotated the respective test with @AllowFailure. I will file a
> separate issue for this.
> 6. As in the current version, there are three queries that are expected to
> fail.
> 7. Since running the test requires an JAXB implementation (not only the JAXB
> API), I have added Sun's JAXB implementation to openjpa-jdbc/pom.xml
> with runtime scope and also to the main pom.xml to specify the version.
> I chose 2.0.5 as I found it the newset from the 2.0 line.
> 8. Since XML column mapping requires a newer PostgreSQL JDBC driver I have
> upgraded the version in openjpa-jdbc/pom.xml and
> openjpa-persistence-jdbc/pom.xml.
> 9. I welcome comments and suggestions.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (OPENJPA-833) An improved test case for XML
column mapping
Posted by "Milosz Tylenda (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/OPENJPA-833?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12659313#action_12659313 ]
Milosz Tylenda commented on OPENJPA-833:
----------------------------------------
Catalina,
The issue for @AllowFailure is OPENJPA-834.
> An improved test case for XML column mapping
> --------------------------------------------
>
> Key: OPENJPA-833
> URL: https://issues.apache.org/jira/browse/OPENJPA-833
> Project: OpenJPA
> Issue Type: Test
> Components: sql
> Affects Versions: 1.3.0, 2.0.0
> Reporter: Milosz Tylenda
> Priority: Minor
> Fix For: 1.3.0, 2.0.0
>
> Attachments: OPENJPA-833.patch, TestXMLCustomerOrder.java, TestXMLCustomerOrder.postgres
>
>
> 1. The current version of TestXMLCustomerOrder does not use assert methods
> requiring programmer to watch the results on the screen. It also fails to
> correctly determine whether some dictionaries support XML column.
> 2. The patched version does roughly the same tests but uses asserts methods
> like other JUnit tests.
> 3. In order to correctly determine XML support, an EnitityManager is created
> so that the DBDictionary executes its connectedConfiguration method. Let me
> know if there is a better method for doing this.
> 4. I know the original idea with the current version was to catch the generated
> SQL and compare it with one saved in a file. It was not done, only the SQL
> is logged to a file and there are three files in the repository with
> database specific SQL. I abandoned this approach as I find comparing SQL
> strings too vulnerable to subtle changes in other areas of OpenJPA (e.g
> column ordering, alias names). On the other hand I found the generated SQL
> files very helpful to get familiar with how the XML support is done. So, I
> removed the SQL logging but the patch contains a file with some queries
> executed against PostgreSQL. Let me know if this removing of SQL logging or
> adding new file is not desired.
> 5. I have found out that filling a List property in entity does not work. I
> have annotated the respective test with @AllowFailure. I will file a
> separate issue for this.
> 6. As in the current version, there are three queries that are expected to
> fail.
> 7. Since running the test requires an JAXB implementation (not only the JAXB
> API), I have added Sun's JAXB implementation to openjpa-jdbc/pom.xml
> with runtime scope and also to the main pom.xml to specify the version.
> I chose 2.0.5 as I found it the newset from the 2.0 line.
> 8. Since XML column mapping requires a newer PostgreSQL JDBC driver I have
> upgraded the version in openjpa-jdbc/pom.xml and
> openjpa-persistence-jdbc/pom.xml.
> 9. I welcome comments and suggestions.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Updated: (OPENJPA-833) An improved test case for XML column
mapping
Posted by "Milosz Tylenda (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/OPENJPA-833?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Milosz Tylenda updated OPENJPA-833:
-----------------------------------
Attachment: OPENJPA-833.patch
> An improved test case for XML column mapping
> --------------------------------------------
>
> Key: OPENJPA-833
> URL: https://issues.apache.org/jira/browse/OPENJPA-833
> Project: OpenJPA
> Issue Type: Test
> Components: sql
> Affects Versions: 1.3.0, 2.0.0
> Reporter: Milosz Tylenda
> Priority: Minor
> Attachments: OPENJPA-833.patch
>
>
> 1. The current version of TestXMLCustomerOrder does not use assert methods
> requiring programmer to watch the results on the screen. It also fails to
> correctly determine whether some dictionaries support XML column.
> 2. The patched version does roughly the same tests but uses asserts methods
> like other JUnit tests.
> 3. In order to correctly determine XML support, an EnitityManager is created
> so that the DBDictionary executes its connectedConfiguration method. Let me
> know if there is a better method for doing this.
> 4. I know the original idea with the current version was to catch the generated
> SQL and compare it with one saved in a file. It was not done, only the SQL
> is logged to a file and there are three files in the repository with
> database specific SQL. I abandoned this approach as I find comparing SQL
> strings too vulnerable to subtle changes in other areas of OpenJPA (e.g
> column ordering, alias names). On the other hand I found the generated SQL
> files very helpful to get familiar with how the XML support is done. So, I
> removed the SQL logging but the patch contains a file with some queries
> executed against PostgreSQL. Let me know if this removing of SQL logging or
> adding new file is not desired.
> 5. I have found out that filling a List property in entity does not work. I
> have annotated the respective test with @AllowFailure. I will file a
> separate issue for this.
> 6. As in the current version, there are three queries that are expected to
> fail.
> 7. Since running the test requires an JAXB implementation (not only the JAXB
> API), I have added Sun's JAXB implementation to openjpa-jdbc/pom.xml
> with runtime scope and also to the main pom.xml to specify the version.
> I chose 2.0.5 as I found it the newset from the 2.0 line.
> 8. Since XML column mapping requires a newer PostgreSQL JDBC driver I have
> upgraded the version in openjpa-jdbc/pom.xml and
> openjpa-persistence-jdbc/pom.xml.
> 9. I welcome comments and suggestions.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.