As of April 12th, you must go to Progress SupportLink to create new support cases or to access existing cases. Please, bookmark the SupportLink URL and use the new portal to contact the support team.
Have a strange problem when querying for an entity. I'm trying to query on "topic_id" (which is a valid field), but DataStore.find() does not return it.
To your point OhmzTech: how would I structure the KinveyRefs when I'm using custom BL? I don't see any modules that let you do that from the server side - unless I'm missing something.
D
Dave Ackerman
said
over 9 years ago
OhmzTech, you're definitely right. I should use relations, but figured I'd try it this way first.
Mark, I'll give that a shot.
M
Mark
said
over 9 years ago
It looks like the `topic_id` is saved as a *ObjectID* instead of string. How did you create these particular documents?
If you saved them through BL, I recommend using the [collectionAccess.objectID](http://devcenter.kinvey.com/reference/business-logic/reference.html#collection-access-module) method to make sure the value is a string, and not an object.
We are aware of the confusion around Object IDs / strings, and we are in the process of moving to strings only. So, in the future, this won’t be a problem anymore.
O
OhmzTech
said
over 9 years ago
Did you try running the query in the console API and see if it works there?
It sounds like "topics" is a collection, any reason you aren't just using relations / kinveyRefs for this?
Dave Ackerman
Here's the row:
http://dl.dropbox.com/u/68704/Screenshots/s38f.png
And my query that doesn't
var subTopicsQuery = new $kinvey.Query();
subTopicsQuery.equalTo('topic_id', '5333298a24aabbb96746ad47');
return $kinvey.DataStore.find('subtopics', subTopicsQuery); // returns []
And the query that does:
var subTopicsQuery = new $kinvey.Query();
subTopicsQuery.equalTo('name', 'UX Lead');
return $kinvey.DataStore.find('subtopics', subTopicsQuery);
I'm replacing 5333298a24aabbb96746ad47 dynamically in my app, but it doesn't work harcoded either.