Re: AnyObjects query

2017-07-04 Thread Francesco Chicchiriccò
On 04/07/2017 16:11, Sergey Beryozkin wrote: Hi Francesco Sure, I agree. I just wanted to send an update on my own basic experiment involving no typed data but assuming there are many tables available :-) May be we have a new GSOC idea here :-) This sounds definitely like a good idea :-)

Re: AnyObjects query

2017-07-04 Thread Francesco Chicchiriccò
On 04/07/2017 15:57, Sergey Beryozkin wrote: I did some experiments in CXF: https://github.com/apache/cxf/blob/master/rt/rs/extensions/search/src/test/java/org/apache/cxf/jaxrs/ext/search/sql/SQLHierarchicalQueryTest.java Indeed, making it work at the generic level, without the typed model,

Re: AnyObjects query

2017-07-04 Thread Sergey Beryozkin
I did some experiments in CXF: https://github.com/apache/cxf/blob/master/rt/rs/extensions/search/src/test/java/org/apache/cxf/jaxrs/ext/search/sql/SQLHierarchicalQueryTest.java Indeed, making it work at the generic level, without the typed model, requires some flexibility at the code level

Re: AnyObjects query

2017-07-03 Thread Francesco Chicchiriccò
On 30/06/2017 18:23, Colm O hEigeartaigh wrote: Hi Francesco, On Fri, Jun 30, 2017 at 3:42 PM, Francesco Chicchiriccò wrote: At persistence level, Relationships have leftEnd and rightEnd:

Re: AnyObjects query

2017-06-30 Thread Colm O hEigeartaigh
Hi Francesco, On Fri, Jun 30, 2017 at 3:42 PM, Francesco Chicchiriccò wrote: > At persistence level, Relationships have leftEnd and rightEnd: > > https://github.com/apache/syncope/blob/2_0_X/core/persistenc > e-api/src/main/java/org/apache/syncope/core/persistence/api/ >

Re: AnyObjects query

2017-06-30 Thread Francesco Chicchiriccò
On 29/06/2017 18:41, Colm O hEigeartaigh wrote: Thanks everyone for the feedback. Francesco, just sticking with curl again, your suggestions works to get the blue cartridges that are in a relationship with a Printer: curl -X GET -u admin:password

Re: AnyObjects query

2017-06-29 Thread Colm O hEigeartaigh
Thanks everyone for the feedback. Francesco, just sticking with curl again, your suggestions works to get the blue cartridges that are in a relationship with a Printer: curl -X GET -u admin:password

Re: AnyObjects query

2017-06-29 Thread Sergey Beryozkin
Sure this code works. For the client geared to do this specific query only. Def not an option for the 'curl' one :-) Sergey On 29/06/17 10:19, Francesco Chicchiriccò wrote: On 29/06/2017 11:04, Sergey Beryozkin wrote: Hi Francesco OK. So, as far as the Syncope returning the list of printers

Re: AnyObjects query

2017-06-29 Thread Francesco Chicchiriccò
On 29/06/2017 11:12, Sergey Beryozkin wrote: I guess one option would be for the client code itself to get all the printer links out of the cartridges and then issue one more query unless the returned model has all the data inlined ? That might work but it would mean the client translating the

Re: AnyObjects query

2017-06-29 Thread Francesco Chicchiriccò
On 29/06/2017 11:04, Sergey Beryozkin wrote: Hi Francesco OK. So, as far as the Syncope returning the list of printers to the client code issuing the query, how would it guess that when someone searches for the blue cartridges it is actually a list of printers is expected ? Where will this

Re: AnyObjects query

2017-06-29 Thread Sergey Beryozkin
I guess one option would be for the client code itself to get all the printer links out of the cartridges and then issue one more query unless the returned model has all the data inlined ? That might work but it would mean the client translating the queries can not be generic itself... Well, I

Re: AnyObjects query

2017-06-29 Thread Sergey Beryozkin
Hi Francesco OK. So, as far as the Syncope returning the list of printers to the client code issuing the query, how would it guess that when someone searches for the blue cartridges it is actually a list of printers is expected ? Where will this code which next goes over the list of all the

Re: AnyObjects query

2017-06-29 Thread Sergey Beryozkin
Hi Fabio That would not work at the generic level as it would require a 2-way relationship (cartridge - printer for ex) which is not always realistic to expect, Sergey On 29/06/17 09:07, Fabio Martelli wrote: Il 28/06/2017 18:34, Colm O hEigeartaigh ha scritto: Thanks for the feedback

Re: AnyObjects query

2017-06-29 Thread Sergey Beryozkin
Yes, as far as the convention is concerned, one would express it as GET /printers?_s=cartridges.colour=blue then at the the next stage it depends if a typed model already exists, if yes, then it can work OOB with for ex JPA2 CXF visitor. In case of Syncope the model is dynamic, hence the

Re: AnyObjects query

2017-06-29 Thread Fabio Martelli
Il 28/06/2017 18:34, Colm O hEigeartaigh ha scritto: Thanks for the feedback guys! Let me just expand a bit on the motivation behind my previous example Let's say I'm managing hundreds of printers each of which have a relationship to a cartridge (of which there are many hundreds) with a

Re: AnyObjects query

2017-06-28 Thread Sergey Beryozkin
Hi Francesco One thing I can point to is this code: https://github.com/apache/cxf/blob/master/rt/rs/extensions/search/src/main/java/org/apache/cxf/jaxrs/ext/search/jpa/AbstractJPATypedQueryVisitor.java#L167 There, in the end,

Re: AnyObjects query

2017-06-28 Thread Francesco Chicchiriccò
On 28/06/2017 10:59, Sergey Beryozkin wrote: Hi Francesco Thanks for the explanation. I see why the example I pointed to won't be applicable to Syncope. In that case when the linked beans are available, CXF AbstractSearchParser will prepare a bean tree which would be initialized with the

Re: AnyObjects query

2017-06-28 Thread Francesco Chicchiriccò
On 28/06/2017 10:41, Sergey Beryozkin wrote: Hi I think something similar works for a CXF FIQL JPA2 visitor, for example: https://github.com/apache/cxf/blob/master/rt/rs/extensions/search/src/test/java/org/apache/cxf/jaxrs/ext/search/jpa/JPATypedQueryVisitorFiqlTest.java#L65 (find the

Re: AnyObjects query

2017-06-28 Thread Sergey Beryozkin
Hi I think something similar works for a CXF FIQL JPA2 visitor, for example: https://github.com/apache/cxf/blob/master/rt/rs/extensions/search/src/test/java/org/apache/cxf/jaxrs/ext/search/jpa/JPATypedQueryVisitorFiqlTest.java#L65 (find the books which have been revied done by Ted) thanks,

Re: AnyObjects query

2017-06-28 Thread Francesco Chicchiriccò
On 27/06/2017 18:18, Colm O hEigeartaigh wrote: Thanks Francesco! On a related note, let's say I have some AnyObjects (Printer) with a relationship to other AnyObjects (Cartridge). Now I want to search for a Printer which has a relationship with a Cartridge with a "colour" attribute of "blue".

Re: AnyObjects query

2017-06-27 Thread Colm O hEigeartaigh
Thanks Francesco! On a related note, let's say I have some AnyObjects (Printer) with a relationship to other AnyObjects (Cartridge). Now I want to search for a Printer which has a relationship with a Cartridge with a "colour" attribute of "blue". Is there a way to do this via a FIQL expression?

AnyObjects query

2017-06-27 Thread Colm O hEigeartaigh
Hi all, How can I retrieve a list of AnyObjects? The following returns a 400: curl -I -X GET -u admin:password http://localhost:9080/syncope/rest/anyObjects Colm. -- Colm O hEigeartaigh Talend Community Coder http://coders.talend.com