-
Notifications
You must be signed in to change notification settings - Fork 32
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Creating resource relationship linkages during a resource create #227
Comments
Interesting. Yes it certainly looks like its because its trying to set nothing in that update statement. Thanks for reporting |
Wrote a quick test. No failures when using the memory connector. Probably to be expected. |
@digitalsadhu Yes just having a belongsTo relationship without even actually populating it will always create a null value. Also if there is profileData it does not actually send the data just the id there so it would look something like this
|
Hmm,
If thats the case as I'm sure you know that is invalid. It should send either:
or
Or did you mean that the server is responding with that invalid data? Are you able to paste model definitions, server response and client payloads? |
I will try and get you this by tomorrow or monday just saw your reply now. But even before the problem with how it is sending back the relationships when there is data we should handle what happens when there the data is null by loopback |
Cool thanks! I'm on holiday for the next 2 weeks. Probably wont be at my computer a whole lot so no rush. |
Creating a resource relationship questions
How should the data look like for the relationship. Just a regular POJO or a full JSON API spec set
i.e. with { id: 123, attributes: { name: ... } }
The reason why the relationship is null is because Ember sends any relationship with no data as null and expects the backend to handle it
It seems the problem is that it is trying to set nothing where userid=$1
The text was updated successfully, but these errors were encountered: