[ 
https://issues.apache.org/jira/browse/CXF-5806?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14037202#comment-14037202
 ] 

Romain Castan edited comment on CXF-5806 at 6/19/14 11:02 AM:
--------------------------------------------------------------

Hi,
The following FIQL expression
{code}
library.books.bookTitle==num10
{code}
means that we want all the books that have the library which contains the book 
'num10'.
In your unit test, the library 'town' contains the book 'num10' and the books 
'num9', 'num10', 'num11' are in library 'town'.
So, the result of FIQL expression must be 3 books.
The SQL generated is the following:
{code:title=SQL}
select book0_.id as id0_, book0_.houseNumber as houseNum2_0_, book0_.street as 
street0_, 
book0_.bookTitle as bookTitle0_, book0_.library_id as library7_0_, 
book0_.dateOfBirth as dateOfBi5_0_, 
book0_.thename as thename0_ 
from Book book0_ 
inner join Library library1_ on book0_.library_id=library1_.id 
inner join Library_Book books2_ on library1_.id=books2_.Library_id 
inner join Book book3_ on books2_.books_id=book3_.id 
where book3_.bookTitle='num10'
{code}


was (Author: tolosa-rom):
Hi,
The following FIQL expression
{code}
library.books.bookTitle==num10
{code}
means that we want all the books that have the library which contains the book 
'num10'.
In your unit test, the library 'town' contains the books 'num10' and the books 
'num9', 'num10', 'num11' are in library 'town'.
So, the result of FIQL expression must be 3 books.
The SQL generated is the following:
{code:title=SQL}
select book0_.id as id0_, book0_.houseNumber as houseNum2_0_, book0_.street as 
street0_, 
book0_.bookTitle as bookTitle0_, book0_.library_id as library7_0_, 
book0_.dateOfBirth as dateOfBi5_0_, 
book0_.thename as thename0_ 
from Book book0_ 
inner join Library library1_ on book0_.library_id=library1_.id 
inner join Library_Book books2_ on library1_.id=books2_.Library_id 
inner join Book book3_ on books2_.books_id=book3_.id 
where book3_.bookTitle='num10'
{code}

> FIQL: Problem with mapping on ManyToMany or OnToMany associations of 2nd level
> ------------------------------------------------------------------------------
>
>                 Key: CXF-5806
>                 URL: https://issues.apache.org/jira/browse/CXF-5806
>             Project: CXF
>          Issue Type: Bug
>          Components: JAX-RS
>    Affects Versions: 2.6.13, 3.0.0
>            Reporter: Romain Castan
>              Labels: patch
>         Attachments: patch.txt
>
>
> The simplest is used an example to illustrate the problem
> {code:title=Example}
> class ClassA {
>     ClassB b;
>     List<ClassD> listD;
> };
> class ClassB {
>     List<ClassC> listC;
> };
> class ClassC {
>     String name;
> };
> class ClassD {
>     String name;
> }
> {code}
> The following request works:
> {code:title=Fiql request OK (1er level)}
> properties: 
> nameD=listD.name
> Request:
> ?_s=nameD==xxxx
> {code}
> The following request doesn't work:
> {code:title=Fiql request KO (2nd level)}
> properties: 
> nameC=b.listC.name
> Request:
> ?_s=nameC==xxxx
> {code}



--
This message was sent by Atlassian JIRA
(v6.2#6252)

Reply via email to