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
When multiple Entity types share one table, position values will be duplicated.
Under these conditions, OrderedEntityService.findByPosition fails to return a unique entity value, leading to a non-unique result error and failure to delete.
My implementation suggestion is to refactor the OrderedEntityService to separate the deletion and reorder logic.
Client apps would then be able to override the deletion mechanism if needed, while still letting the reorder, which relies on the entity manager and more complex logic, do what it needs to do.
I do not think separating deletion from reordering is the right approach. For an ordered entity when a delete occurs you must reorder or will have corrupt ordering. Reorder must continue to be a side-effect of deletion. I do think the extensibility of this service could be improved to afford to delete/reorder by a combination of properties in addition to the position.
I would recommend an additional method for overriding to add additional properties to the query conditions in conjunction with the position column.
When multiple Entity types share one table, position values will be duplicated.
Under these conditions,
OrderedEntityService.findByPosition
fails to return a unique entity value, leading to a non-unique result error and failure to delete.Weaver-Webservice-Core/data/src/main/java/edu/tamu/weaver/data/service/OrderedEntityService.java
Line 53 in 1843472
The text was updated successfully, but these errors were encountered: