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

Some issues with the Hibernate example #94

Open
lukaseder opened this issue Feb 14, 2020 · 0 comments
Open

Some issues with the Hibernate example #94

lukaseder opened this issue Feb 14, 2020 · 0 comments

Comments

@lukaseder
Copy link
Contributor

I'm currently translating some of the Java/Hibernate examples to jOOQ and found a few issues that you may or may not want to address:

CustomerService::deleteCustomer fails when orders have OrderProduct entries:

This query here:

Query deleteReferencing = session.createQuery("delete from Order where customer_id = :id");

Will fail in case there are entries in order_products, which does not have ON DELETE CASCADE clauses on its foreign keys by default (I think). I'm not sure if this is desired here.

OrderService::deleteOrder fails because of wrong query:

This query here:

Query deleteReferencing = session.createQuery("delete from Order where order_id = :id");

Will fail because the Order entity doesn't have an order_id column. I think the intention here was to delete the record in order_products

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