OBGM-468 Fix no transaction for product type update and delete methods#4156
OBGM-468 Fix no transaction for product type update and delete methods#4156awalkowiak merged 4 commits intofeature/upgrade-to-grails-3.3.10from
Conversation
drodzewicz
left a comment
There was a problem hiding this comment.
Looking at the changes you have made reminded me of what Justin mentioned not too long ago about not wanting to create separate domain-based services.
Although it is not the exact case here, I think we can avoid implementing simple get() delete() etc... actions in services and instead use a generic approach like GenericApiService.
Both delete and get are already implemented there
|
Alternatively, there is also this approach of creating an abstract class with generic actions and extending some other services with this abstract class like it is shown in the examples of this little article. |
|
@drodzewicz as for |
… in the productTypeService
jmiranda
left a comment
There was a problem hiding this comment.
LGTM.
By the way, this is one of those scaffolded CRUD controllers that I'd prefer to be @transactional until we figure out where these methods should go i.e. probably ProductService. But since this one snuck in, we can grandfather it in and refactor later if we choose.
Katarzyna has asked me to fix also update and delete methods in this ticket, so those are the changes to include them.