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
Spring allows setting the exported attribute of the RepositoryRestResource annotation to false.
If this is done, no HTTP methods are available for the corresponding entity. Also, if that entity B is referenced in another entity A using a relationship, no link is generated for GET responses for A. Instead, there will be a field in the A object containing an object representing B, but that object does not contain an ID field. Therefore, if the entity A returned from a GET request is used for an update, Spring will complain about the missing ID.
If FeGen should allow using entities that are not exported as fields of other entities, this means that the following things should work ("B" stands for an entity that is not exported and "A" stands for an entity that has a field that references B):
Create an instance of A referencing an instance of B that is already in the database. In A's field for B, an object containing the ID of B in an "id" field must be sent. This ID must probably be retrieved from a custom endpoint since Spring does not export it by default.
Update an instance of A that has been retrieved by a GET request. If the value of B was not null and should not be changed, the ID of B must be added to the object before the PUT. Otherwise, the update will fail. Not sending the B field is not an option since that will set it to null
The text was updated successfully, but these errors were encountered:
Spring allows setting the exported attribute of the RepositoryRestResource annotation to false.
If this is done, no HTTP methods are available for the corresponding entity. Also, if that entity B is referenced in another entity A using a relationship, no link is generated for GET responses for A. Instead, there will be a field in the A object containing an object representing B, but that object does not contain an ID field. Therefore, if the entity A returned from a GET request is used for an update, Spring will complain about the missing ID.
If FeGen should allow using entities that are not exported as fields of other entities, this means that the following things should work ("B" stands for an entity that is not exported and "A" stands for an entity that has a field that references B):
The text was updated successfully, but these errors were encountered: