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

Michele Riva commented on UNOMI-234:
------------------------------------

Hi, I just tested the second case and I found out that the issue was using 
"location" as key (it's a reserved key).
I successfully inserted the following user:
{code:java}
{
"itemId":"82739482309",
"version":1,
"itemType":"profile",
"properties":{
"name": {
"first": "John",
"last": "Doe",
"middle": "Mitch"
},
"contacts": {
"email": "[email protected]",
"phone": "0000000000"
},
"location1": {
"city": "Milan",
"country": "Italy",
"address": "Piazza Duomo",
"zipCode": "20019"
},
"foo": {
"bar": {
"baz": 182947012394
}
},
"fax": [1, 2, 3, 4]
},
"systemProperties":{},
"segments":[],
"scores":{},
"mergedWith":null,
"consents":{}
}
{code}
and I also spawned the following query against "cxs/profiles/search":
{code:java}
{
"offset": 0,
"limit": 10,
"condition": {
"type": "profilePropertyCondition",
"parameterValues": {
"propertyName": "properties.contacts.email",
"comparisonOperator": "equals",
"propertyValue": "[email protected]"
}
},
"forceRefresh": false
}
{code}
which worked perfectly!

Maybe it would be great to have a documentation about reserved keys and also 
about queries (I couldn't find it anywhere)

> Nested profile properties doesn't allow a profile to be inserted
> ----------------------------------------------------------------
>
>                 Key: UNOMI-234
>                 URL: https://issues.apache.org/jira/browse/UNOMI-234
>             Project: Apache Unomi
>          Issue Type: Bug
>    Affects Versions: 1.4.0
>            Reporter: Michele Riva
>            Priority: Major
>
> I am not able to post the following properties to */cxs/profiles*:
>  
> {code:java}
> {
>  ...
>  "properties": {
>    "contacts": {
>      "phone": "xxxxxxxxxx",
>      "email": "xxxxxxxxxx"
>    },
>    "user": {
>      "name": {
>         "first": "John",
>         "last:" "Doe"
>      }
>    },
>    "location": {
>      "city": "Milan",
>      "country": "Italy",
>      "address": "Piazza Duomo",
>      "zipCode": "20019" 
>    }
>  }
> }{code}
>  
>  
> I get a 204 status code and no content as response (as the status code 
> suggests).
> Posting the same data without nested objects works fine, getting back a 200 
> status code and the object itself.
> Not sure if a bug or a feature request, but it could be really useful to post 
> nested objects as properties.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to