[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
[
List Home]
Re: [eclipselink-dev] questions while running JPA JUnit tests
|
Hi Tom,
Why does it check supportsPrimaryKeyConstraint() and not
supportsUniqueKeyConstraint()?
It is possible, this is a legacy issue. (i.e. from before we had
platform support for unique key constraints) Please file a bug.
Done!
https://bugs.eclipse.org/bugs/show_bug.cgi?id=289403
2. Check-in: bug 289019, bug 289020, bug 289021 and bug 289023
You merged the patches into one and marked the bugs as fixed. Have
you committed the patch? I couldn't find it in trunk.
I am not sure what happened to my check-in. The changes should be there
now.
Thanks!
3. INNER JOIN
Symfoware does not support (INNER) JOIN syntax.
"JOIN" is used in SQLSelectStatement twice, at least one of which is
used when using a self-referencing many to many relationship and
performing a (JPQL) LEFT OUTER JOIN query. I can prevent the syntax
error by replacing the inner join by a left outer join for Symfoware,
but I'm worried that might select too many rows. I suppose a better
solution is to compare join keys in the where clause. What do you think?
Do you happen to know an easy way to do that (using existing code)? If
not, never mind, I'll do some more research myself.
Could you please give an example of a statement that gives you an issue,
what the resulting SQL is, and what part of it is not supported by
Symfoware?
Query query = em.createQuery("SELECT o from Person o LEFT OUTER JOIN
o.persons AS p");
gives:
SELECT t0.ID, t0.NAME, t1.ID, t1.NAME FROM {oj PERSON t0 LEFT OUTER JOIN
(PERSON_PERSON t2 JOIN PERSON t1 ON (t1.ID = t2.persons_ID)) ON
(t2.Person_ID = t0.ID)}
Symfoware complains about "JOIN", saying that the join type is not
specified. Legal values are LEFT/RIGHT (OUTER).
So I suppose I should change it to generate something like:
SELECT t0.ID, t0.NAME, t1.ID, t1.NAME FROM {oj PERSON t0 LEFT OUTER JOIN
(SELECT PERSON_PERSON t2, PERSON t1 WHERE t1.ID = t2.persons_ID) ON
(t2.Person_ID = t0.ID)}
4. Patches.
Start by attaching the single patch to the Symfoware platform bug and
describing the issues. If any of the changes are large enough to merit
their own bug, we can add the bug later.
Done!
https://bugs.eclipse.org/bugs/show_bug.cgi?id=288715
From your previous email:
1. --
LANGUAGE, VALUE, DOMAIN, SEQUENCE
- I am still hoping to find the time to deal with these issues.
I have enclosed most if not all occurrences in double-quotes in the
patch I attached to the bug for SymfowarePlatform.
That worked for me with Symfoware, and I have also confirmed with Derby
that none of my changes caused new failures on Derby.
56% of 1270 tests (I temporarily disabled some) are currently passing.
I will document some of the limitations in this platform I found on the
Wiki tomorrow.
The biggest issue I still have is that I get errors saying that the
resource (table, etc.) is locked by another user, or sometimes it even
hangs on getConnection. I checked with the JDBC driver's trace info and
found the number of calls to getConnection to be much higher than the
number of calls to close(). I assume that this could be related. I don't
know whether connections were not closed because cleanup processing did
not complete for failing JUnit tests, or something else is going on, but
if you have any suggestions I'm all ears.
What I'll try first is to disable ElipseLink connection pooling and see
how that affects it.
I also hope you can find some time to review the patches I attached to
the bug. You might see something obviously wrong or missing that can
help boost the passing rate when fixed.
Thanks!
Dies