Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [eclipselink-dev] rewriting updateall queries clean-up code in tests

Hi Tom,

That was it, thanks!

I had copied the Symfo alternative queries from jpa.fieldaccess and apparently Eclipse automatically added the import statement to the old classes. I hadn't noticed it as it all compiled fine.

I took out the import and now they pass.

Cheers,
Dies


On 13/01/2010 05:36, Tom Ware wrote:
Hi Dies,

I am surprised the Address class used in
JoinedAttributeAdvancedJunitTest is from the package
org.eclipse.persistence.testing.models.jpa.fieldaccess.advanced. I would
expect to be using the one from:
org.eclipse.persistence.testing.models.jpa.advanced. Do you have a
reference to the class from the wrong package?

-Tom

Dies Koper wrote:
Hi Tom,

On 12/01/2010 16:51, Dies Koper wrote:
I am a hesitant to change this test for all platforms, but you could
add
an isSymfoware() check and then do some alternate clean up. Which
queries fail? (I assume just the ones that deal with Employee)

Yes, you are correct, just the UpdateAllQuery and DeleteAllQuery with
Employee.
With the alternate clean up all tests in these suites now pass. Thanks!

They passed when I ran just their suites, but as part of the JPA LRG
the testSetup method fails:

Exception Description: Missing descriptor for [class
org.eclipse.persistence.testing.models.jpa.fieldaccess.advanced.Address].
Query: ReadAllQuery(referenceClass=Address )
at
org.eclipse.persistence.exceptions.QueryException.descriptorIsMissing(QueryException.java:433)

[...]
at
org.eclipse.persistence.internal.sessions.AbstractSession.readAllObjects(AbstractSession.java:2618)

at
org.eclipse.persistence.testing.tests.jpa.advanced.JoinedAttributeAdvancedJunitTest.populate(JoinedAttributeAdvancedJunitTest.java:110)

at
org.eclipse.persistence.testing.tests.jpa.advanced.JoinedAttributeAdvancedJunitTest.testSetup(JoinedAttributeAdvancedJunitTest.java:168)


The line is:
objectVectors[i] = getDbSession().readAllObjects(classes[i]);

What could be wrong?

Thanks,
Dies



Back to the top