Comments (26)
But m having the same issue with 1.9.2 included key shows fully in network response but
get('includedKey').get('property') fails.
from parse-sdk-js.
Hey, I'm experiencing the same issue in 1.9.
var query = new Parse.Query('TimeEntry');
var date = request.param.date;
date.setHours(0, 0, 0, 0);
query.greaterThanOrEqualTo('endDate', date);
date.setHours(23, 59, 59, 999);
query.lessThanOrEqualTo('startDate', date);
query.ascending('startDate');
query.include('project');
However the result does not include e.g. the project title or the color (both String).
[Object]
0:Object
endDate: Fri Jul 08 2016 10:48:53 GMT+0200 (CEST)
project: ParseObject
_objCount: 4
attributes: (...)
className: "Project"
createdAt: (...)
id: "Si2r48jM1O"
updatedAt: (...)
__proto__: Object
startDate: Fri Jul 08 2016 10:42:04 GMT+0200 (CEST)
...
I even tried to extend the Parse.Object like this and call the query correspondingly but with no result, except that the 'project' becomes a ParseSubclassObject.
var TimeEntry = Parse.Object.extend('TimeEntry');
var Project = Parse.Object.extend('Project');
var query = Parse.Query(TimeEntry);
What else can I do?
from parse-sdk-js.
@mbruschi the attributes
object there contains your properties. Printing an object with console.log does not show attributes, since they are a) noisy and b) generated on demand from any local unsaved changes.
The fact that project
is not a pointer, but a full-blown object with createdAt and updatedAt fields suggests that the include
worked exactly as intended.
from parse-sdk-js.
just tried changing Parse version to latest instead of 1.6.4 and query.include is working. I wonder what is the problem with setting the Parse version to 1.6.4 through parse jssdk 1.6.4?
from parse-sdk-js.
Thank you for your feedback. We prioritize issues that have clear and concise repro steps. Please see our Bug Reporting Guidelines about what information should be added to this issue.
Please try the latest SDK. Our release notes have details about what issues were fixed in each release.
In addition, you might find the following resources helpful:
- Documentation: https://www.parse.com/docs
- Google Groups: https://groups.google.com/forum/#!forum/parse-developers
- Stack Overflow: http://stackoverflow.com/tags/parse.com
from parse-sdk-js.
Here is the code:
var query = new Parse.Query("Menu");
query.equalTo("objectId", req.params.menuId);
query.find().then(function (menu) {
var relation = menu[0].relation("sections");
var relQuery = relation.query();
relQuery.include("pdName");
return relQuery.find();
}).then(function (sections) {
var json = {
draw: draw,
data: sections,
recordsFiltered: sections.length,
recordsTotal: sections.length
};
res.json(json);
}, function (error) {
res.json(error);
});
Here is what I get for the field pdName for version 1.6.4:
"pdName": {
"__type": "Pointer",
"className": "PhraseDictionary",
"objectId": "8N1TwAQvR7"
},
Here is what I get for the field pdName with either version: latest or 1.6.2
"pdName": {
"createdAt": {
"__type": "Date",
"iso": "2015-10-01T01:54:43.289Z"
},
"de": "",
"en": "Test name",
"es": "",
"fr": "",
"it": "",
"place": {
"__type": "Pointer",
"className": "Place",
"objectId": "GrQzLeDfjh"
}
It seems that latest is not pointing to 1.6.4 because I still have the same parent not defined error when using it, but when I change to 1.6.4 the relation error is not happening, but the query.include one yes.
I hope I made myself clear.
Thanks
from parse-sdk-js.
This might be an issue with caching on our cloud code servers. I'll kick off a cache flush and see if latest then points to 1.6.4 as it should.
from parse-sdk-js.
"latest" now appears as 1.6.4 for me. Check if you're still having issues, @marlonguerios
from parse-sdk-js.
I can confirm that 1.6.2 works and 1.6.4 does not.
from parse-sdk-js.
Same here. Now latest is pointing to 1.6.4, but I still have the problem with query.include not returning the included object.
from parse-sdk-js.
Same issue here, my cloud code just stopped working, not included objects anymore :(
Changed to 1.6.2 and fixed.
from parse-sdk-js.
From my investigation, it seem that this only affects the results of queries made in cloud code (the query fetches the nested objects, they are available in cloud code, but when they return to the client they are pointers). Is that in line with what everyone here is experiencing?
from parse-sdk-js.
@andrewimm same behavior here.
from parse-sdk-js.
Sorry all, I believe this was an oversight introduced in f2d35f2. We didn't realize this would affect nested queries coming back from cloud code, but we should have a fix in later today.
In the meantime, we've added tests for returning nested query results to our Cloud Code suite, so that we'll notice beforehand if something here breaks again.
from parse-sdk-js.
1.6.6 fixes this. It's out on npm now, and is currently being deployed to cloud code. I'll follow up when that process has completed.
from parse-sdk-js.
This happened last night. 1.6.6 is available everywhere, and should fix this issue. "latest" on cloud code should also point to 1.6.6
from parse-sdk-js.
can you check this works with dotted dotted includes? e.g. x.y , myObject.createdUserRef
I am trying to get this to work and it works at the first level now, but doesn't seem to traverse
from parse-sdk-js.
is 'seen' in toJSON too simple? what about scenario where there are 2 pointers to the same object, but for different reasons and you want to expand 1. e,g,
"createdUserRef": {
"__type": "Pointer",
"className": "_User",
"objectId": "tUFQNVcQSD"
},
"userRef": {
"__type": "Pointer",
"className": "_User",
"objectId": "tUFQNVcQSD"
},
here the createdBy user and the user are different things that happen to point to the same _User
from parse-sdk-js.
@swilli40, we tried passing seen
to toJSON
, but the two paths were decoupled just enough that it made the process difficult to do cleanly. I would like to generalize the idea that all special types know how to encode themselves, and that encode simply does the tree-crawling, but it's going to take a little more time to clean up. You can consider 1.6.6/.7 as immediate responses to most people encountering this problem, while we buy ourselves a few more days to get a cleaner solution under the hood. I'm actively working on this.
from parse-sdk-js.
@swilli40 actually, I take that back. It looks like the original attempts were complicated by the same issue I hit with the eventually-merged solution: the exported version of encode
did not take a seen-array as an argument. I've rewritten the solution, and once I've verified it works with multiple nested includes, I'll get it out to cloud code.
from parse-sdk-js.
It might need a leaf first crawler as converting a parse object to object means lower objects with attributes won't be expanded. Bottom up would prevent this issue.
from parse-sdk-js.
any news on this one?
from parse-sdk-js.
This should have been fixed in 1.6.8, which is currently on npm and will go out to cloud code later today
from parse-sdk-js.
great. thanks
from parse-sdk-js.
Andrew, not fixed, built the 1.6.8 and debugged locally. Same issue with dotted includes. x.y
Parse REST interface expands, but _toFullJSON(), toJSON() converts to Pointer objects, even if include is specified and the returned JSON is expanded from Parse
from parse-sdk-js.
the same issue in 2.4.0
this is my code
return new Promise((resolve, reject) => {
// const Class = Parse.Object.extend(CLASS);
const query = new Parse.Query(CLASS);
query.include([
"billboard",
"billboard.complaintStatus",
"billboard.taxStatus"
]);
query.equalTo(OBJECT, KEY);
query.find().then(
res => {
resolve(res);
},
err => {
reject(err);
}
);
});
billboard is a column name (pointer)
somebody help me? thanks
from parse-sdk-js.
Related Issues (20)
- API Reference Documentation not updated HOT 1
- SDK throws error in web contexts where calling into `window.indexedDB` is prohibited, but not undefined on the window HOT 2
- Calling `.add` multiple times on relations is broken HOT 4
- Refused to get unsafe header "access-control-expose-headers" on Chrome HOT 17
- Allow for REST Content Override for Server protection HOT 2
- Align currently supported Node.js version HOT 4
- `Parse.User.verifyPassword` does not pass request options to server HOT 5
- Parse SDK 4.3.1 is not working with React Native / Expo HOT 9
- Expo RN and ParseLiveQuery EventEmitter error HOT 13
- Cannot set ACL from JSON HOT 1
- Infinite loop in `encode.js` HOT 5
- Missing test for `Parse.User.verifyPassword` option `ignoreEmailVerification` HOT 2
- `Parse.Object.set` sliently handles validation errors HOT 1
- TypeError: attempted to use private field on non-instance, js engine: hermes HOT 3
- Installation support for JS SDK HOT 4
- Allow to run queries through LiveQueryClient (Parse Server issue #9086) HOT 5
- Local state of objects not correct if setting multiple properties HOT 2
- LocalDatastore tests fail HOT 4
- Parse.Installation doesn't handle deleted Installation objects on server HOT 3
- Replace dependency ip-node HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from parse-sdk-js.