On 27/10/2017 10:11, Francesco Chicchiriccò wrote:
Hi Colm,
I confirm the problem on master; 2_0_X works fine with your use-case below, instead.

I probably made some mistake when merging to master; a fix will be provided soon.

Here you go:

http://git-wip-us.apache.org/repos/asf/syncope/commit/869b113d

Regards.

On 26/10/2017 18:58, Colm O hEigeartaigh wrote:
Hi all,

A quick follow-up on the fix for SYNCOPE-1138. I'm not able to reproduce
the fix on the latest master code - maybe I'm missing something obvious.

Here's what I'm doing:

a) Create a "size" plain attribute
b) Create EngineClass AnyTypeClass with this attribute, and a CarClass
AnyTypeClass
c) Create "isPoweredBy" relationship.
d) Create a "BigEngine" Engine with a of 2000
e) Create a "BigCar" Car with a relationship to BigEngine.

I can see the relationship when I search for BigCar:

curl -u admin:password "
http://localhost:9080/syncope/rest/anyObjects?fiql=%24type==Car";
{"prev":null,"next":null,"page":1,"size":1,"totalCount":1,"result":[{"@class":"org.apache.syncope.common.lib.to.AnyObjectTO","creator":"admin","creationDate":"2017-10-26T16:54:13.495+0000","lastModifier":"admin","lastChangeDate":"2017-10-26T16:54:13.495+0000","key":"7d29f927-056f-481a-a9f9-27056fb81ac0","type":"Car","realm":"/","status":null,"name":"BigCar","dynRealms":[],"auxClasses":[],"plainAttrs":[],"derAttrs":[],"virAttrs":[],"resources":[],"relationships":[{"type":"isPoweredBy","otherEndType":"Engine","otherEndKey":"bdfe29c5-d82a-4c76-be29-c5d82a1c7680"}],"memberships":[],"dynMemberships":[]}]}

but not when I search for BigEngine:

curl -u admin:password http://localhost:9080/syncope/rest/curl -u
admin:password "
http://localhost:9080/syncope/rest/anyObjects?fiql=%24type==Engine;size==2000
"
{"prev":null,"next":null,"page":1,"size":1,"totalCount":1,"result":[{"@class":"org.apache.syncope.common.lib.to.AnyObjectTO","creator":"admin","creationDate":"2017-10-26T16:53:44.848+0000","lastModifier":"admin","lastChangeDate":"2017-10-26T16:53:44.848+0000","key":"bdfe29c5-d82a-4c76-be29-c5d82a1c7680","type":"Engine","realm":"/","status":null,"name":"BigEngine","dynRealms":[],"auxClasses":[],"plainAttrs":[{"schemaInfo":{"@class":"org.apache.syncope.common.lib.to.PlainSchemaTO","key":"size","anyTypeClass":"EngineClass","type":"String","mandatoryCondition":"false","multivalue":false,"uniqueConstraint":false,"readonly":false,"conversionPattern":null,"validator":null,"enumerationValues":"","enumerationKeys":"","secretKey":null,"cipherAlgorithm":null,"mimeType":null},"schema":"size","values":["2000"]}],"derAttrs":[],"virAttrs":[],"resources":[],"relationships":[],"memberships":[],"dynMemberships":[]}]}

I was expecting to see the reference to BigCar here, as the relationship is
bi-directional but nothing is there. Am I missing something?

Colm.

--
Francesco Chicchiriccò

Tirasa - Open Source Excellence
http://www.tirasa.net/

Member at The Apache Software Foundation
Syncope, Cocoon, Olingo, CXF, OpenJPA, PonyMail
http://home.apache.org/~ilgrosso/

Reply via email to