You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
But it may be an enhancement request or a bug, so I'll post it here too.
I read Oliver's comments regarding REST URIs vs entity IDs in issue #13 and his points are well-taken. But this causes a problem when trying to save associations, because Spring Data REST doesn't convert the associated resource's URI into an entity ID, which Spring Data JPA needs to save the association.
The thought is that if I post a resource with some associated resource already linked as part of the representation, then Spring Data REST ought to be able to resolve that on the backend to an association between the two entities involved. Especially if we're talking about a many-to-one relationship. If I have to come along with a subsequent post (see the "Updating relationships" section of https://github.com/SpringSource/spring-data-rest/wiki/JPA-Repository-REST-Exporter), then doesn't that mean that I can't use @NotNull on the association in question? (It looks like the "Updating relationships" documentation might be talking about parent/child relationships.)
The text was updated successfully, but these errors were encountered:
I'm having trouble using Spring Data REST to save associations between entities. I posted the issue on StackOverflow as a question:
http://stackoverflow.com/questions/12879975/spring-data-rest-uri-vs-entity-id
But it may be an enhancement request or a bug, so I'll post it here too.
I read Oliver's comments regarding REST URIs vs entity IDs in issue #13 and his points are well-taken. But this causes a problem when trying to save associations, because Spring Data REST doesn't convert the associated resource's URI into an entity ID, which Spring Data JPA needs to save the association.
The thought is that if I post a resource with some associated resource already linked as part of the representation, then Spring Data REST ought to be able to resolve that on the backend to an association between the two entities involved. Especially if we're talking about a many-to-one relationship. If I have to come along with a subsequent post (see the "Updating relationships" section of https://github.com/SpringSource/spring-data-rest/wiki/JPA-Repository-REST-Exporter), then doesn't that mean that I can't use @NotNull on the association in question? (It looks like the "Updating relationships" documentation might be talking about parent/child relationships.)
The text was updated successfully, but these errors were encountered: