mirror of https://github.com/apache/openjpa.git
OPENJPA-1185 Subquery restructure code
cleanup comments in testcase git-svn-id: https://svn.apache.org/repos/asf/openjpa/trunk@804418 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
25d3c8247b
commit
92fcf33575
|
@ -1621,9 +1621,9 @@ public class TestEmbeddable extends SingleEMFTestCase {
|
||||||
}
|
}
|
||||||
for (int i = 0; i < query2.length; i++) {
|
for (int i = 0; i < query2.length; i++) {
|
||||||
try {
|
try {
|
||||||
rs = em.createQuery(query2[i]).getResultList();
|
rs = em.createQuery(query2[i]).getResultList();
|
||||||
} catch(ArgumentException e) {
|
} catch(ArgumentException e) {
|
||||||
// as expected
|
// as expected: comparison over embedded object is not allowed
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
EntityTransaction tran = em.getTransaction();
|
EntityTransaction tran = em.getTransaction();
|
||||||
|
@ -1692,7 +1692,7 @@ public class TestEmbeddable extends SingleEMFTestCase {
|
||||||
" from EntityA_Coll_Embed_Embed a1, in (a1.embeds) e2) " +
|
" from EntityA_Coll_Embed_Embed a1, in (a1.embeds) e2) " +
|
||||||
" order by e.intVal3",
|
" order by e.intVal3",
|
||||||
// non-corelated subquery:
|
// non-corelated subquery:
|
||||||
// TODO: known problem in table alias resolution for subquery
|
// Fixed in OPENJPA-1185: known problem in table alias resolution for subquery
|
||||||
// the genarated SQL subquery should be non-corelated,
|
// the genarated SQL subquery should be non-corelated,
|
||||||
// but generated corelated subquery.
|
// but generated corelated subquery.
|
||||||
"select e, e.intVal1, e.embed.intVal2 from " +
|
"select e, e.intVal1, e.embed.intVal2 from " +
|
||||||
|
@ -1717,7 +1717,7 @@ public class TestEmbeddable extends SingleEMFTestCase {
|
||||||
" from EntityA_Coll_Embed_Embed a, in (a.embeds) e) " +
|
" from EntityA_Coll_Embed_Embed a, in (a.embeds) e) " +
|
||||||
" order by e.intVal3",
|
" order by e.intVal3",
|
||||||
// corelated subquery:
|
// corelated subquery:
|
||||||
// TODO: known problem in table alias resolution for subquery
|
// Fixed in OPENJPA-1185: known problem in table alias resolution for subquery
|
||||||
// the genarated SQL subquery should be corelated,
|
// the genarated SQL subquery should be corelated,
|
||||||
// but generated non-corelated subquery.
|
// but generated non-corelated subquery.
|
||||||
"select e, e.intVal1, e.embed.intVal2 from " +
|
"select e, e.intVal1, e.embed.intVal2 from " +
|
||||||
|
@ -1777,7 +1777,7 @@ public class TestEmbeddable extends SingleEMFTestCase {
|
||||||
try {
|
try {
|
||||||
rs = em.createQuery(query3[i]).setParameter(1, obj).getResultList();
|
rs = em.createQuery(query3[i]).setParameter(1, obj).getResultList();
|
||||||
} catch(ArgumentException e) {
|
} catch(ArgumentException e) {
|
||||||
// as expected
|
// as expected: comparison over embedded object is not allowed
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1855,7 +1855,7 @@ public class TestEmbeddable extends SingleEMFTestCase {
|
||||||
setParameter(1, (Embed) obj).
|
setParameter(1, (Embed) obj).
|
||||||
getResultList();
|
getResultList();
|
||||||
} catch (ArgumentException e) {
|
} catch (ArgumentException e) {
|
||||||
// expected exception
|
// expected exception: comparison over embedded object is not allowed
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
try {
|
try {
|
||||||
|
@ -1865,7 +1865,7 @@ public class TestEmbeddable extends SingleEMFTestCase {
|
||||||
setParameter(1, ea.getEmbed()).
|
setParameter(1, ea.getEmbed()).
|
||||||
getResultList();
|
getResultList();
|
||||||
} catch (ArgumentException e) {
|
} catch (ArgumentException e) {
|
||||||
// expected exception
|
// expected exception: comparison over embedded object is not allowed
|
||||||
}
|
}
|
||||||
em.clear();
|
em.clear();
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue