Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Transaction, LazyLoading and inconsistencies in display #40

Open
bhegmanns opened this issue Oct 11, 2020 · 0 comments
Open

Transaction, LazyLoading and inconsistencies in display #40

bhegmanns opened this issue Oct 11, 2020 · 0 comments

Comments

@bhegmanns
Copy link

Hi,
the addressed problem of your application is interested.

But: you created a very "interesting" domain model;) instead of creating services for admin you connected your products with all order and/or order items. So nearly all objects in your model belong together.
And the additional problem is, that the jsps should handle on old products (inside the session) and orderlists while changing attributes so there is in combination with your problematic domain model a facility for lazy loading exceptions during update when a client ordered some items.
The transaction-problem is the least problem;)

I made some changes for solving most of the fails in my own branch, and I can make a PR:

  • setup transaction management
  • created a new page for not proceeded order
  • ensure , that updates and deletes by admin work whatever clients order
    (but there are possible fails too, e.g. an admin-user tries to update a product during an other admin-user deletes the same product)

There is at least one functional fail (should probably solved by a new issue):

  • if the price of an product is changed, the price is changed in all orders too (I think no customer will accept such behavior, he want's the product with the old price ;) )

But I think there should be some other important issues:

  • change domain model with lower belongings
  • create AdminServices for displaying statistics
  • transfer most of the logic (building sums, etc) into the services or (better) domain objects
  • perhaps using optimistic locking in your domain model
  • using Long instead of long for entity-id

Give me a hint, if I should make a PR for the topics above :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant