crnk-project / crnk-framework

JSON API library for Java
Apache License 2.0
287 stars 156 forks source link

Make JPA relationships with mappedBy immutable #510

Open remmeier opened 5 years ago

remmeier commented 5 years ago

mappedBy JPA fields are not postable and patchable because of the mappedBy semantic of JPA. Accordingly the ResourceInformation should reflect this information as such. To change such relationships, the opposite side must be used. Crnk relationship requests will be served automatically from the proper side of the relationship due avoid running in such JPA details/"issues".

remmeier commented 5 years ago

not quite as easy as immutablity. setting the immuablity also affects the relationship repositories, not just the resource ones => not desired in this case.