cockroachdb / cockroachdb/examples-orms

Some issues with the Hibernate example

Đang mở
#94 0 bình luận 0 reaction 0 người được giao Xem trên GitHub
Ngôn ngữ chính
Go
Star
82
Fork
37
Chỉ số merge pull request
Không có pull request nào được merge trong 30 ngày

Mô tả

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:

https://github.com/cockroachdb/examples-orms/blob/8aacfca23a8b91667aad846e7e41e4e14c7658cc/java/hibernate/src/main/java/com/cockroachlabs/services/CustomerService.java#L83

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:

https://github.com/cockroachdb/examples-orms/blob/8aacfca23a8b91667aad846e7e41e4e14c7658cc/java/hibernate/src/main/java/com/cockroachlabs/services/OrderService.java#L83

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`

Hướng dẫn đóng góp

Chưa lập chỉ mục được hướng dẫn đóng góp cho kho mã nguồn này

Đánh giá

Issue này chưa được đánh giá.

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.