[Developers] query for values vs name/id
Steve Sak
ssak at appliedminds.com
Thu May 24 15:55:38 UTC 2007
Given that I've performed a query to get the properties of some class,
say /music/artist and now want to get the "values" and maybe some other
attributes of those properties what does the query look like? The
problem I'm running into is when asking for attributes explicitly I
can't tell if the property refers to a primitive attibute or another
object. Perhaps I'm just missing something obvious.
For instance:
{"query0": { "query":[{
"limit":1,
"name":"The Police",
"type":"/music/artist",
"/music/artist/active_start":[{"name":null,"id":null}],
"/music/artist/acquire_webpage":[{"name":null,"id":null}],
"/music/artist/album":[{"name":null,"id":null}],
"/music/artist/similar_artist":[{"name":null,"id":null}],
"/music/artist/origin":[{"name":null,"id":null}],
"/music/artist/home_page":[{"name":null,"id":null}],
"/music/artist/active_end":[{"name":null,"id":null}],
"/music/artist/label":[{"name":null,"id":null}],
"/music/artist/artist_similar":[{"name":null,"id":null}],"
/music/artist/genre":[{"name":null,"id":null}],
"/music/artist/track":[{"name":null,"id":null}],
"/music/artist/contribution":[{"name":null,"id":null}],
"/music/artist/member":[{"name":null,"id":null}]}]}}
gives the error:
{
"status": "/mql/status/error",
"messages": [ {
"info": {
"property": "name",
"expected_type": "/type/datetime"
},
"query": [ {
"/music/artist/active_start": [ {
"error_inside": ".",
"name": null,
"id": null
}],
"/music/artist/acquire_webpage": [ {
"name": null,
"id": null
}],
"limit": 1,
"type": "/music/artist",
"/music/artist/album": [ {
"name": null,
"id": null
}],
"/music/artist/similar_artist": [ {
"name": null,
"id": null
}],
"/music/artist/home_page": [ {
"name": null,
"id": null
}],
"/music/artist/origin": [ {
"name": null,
"id": null
}],
"/music/artist/active_end": [ {
"name": null,
"id": null
}],
"/music/artist/label": [ {
"name": null,
"id": null
}],
"/music/artist/genre": [ {
"name": null,
"id": null
}],
"/music/artist/artist_similar": [ {
"name": null,
"id": null
}],
"/music/artist/track": [ {
"name": null,
"id": null
}],
"/music/artist/contribution": [ {
"name": null,
"id": null
}],
"name": "The Police",
"/music/artist/member": [ {
"name": null,
"id": null
}]
}],
"type": "/mql/error",
"message": "Type /type/datetime does not have property name",
"path": "/music/artist/active_start",
"status": "/mql/status/type_error"
}]
}
More information about the Developers
mailing list