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

Delete Comment is not working #1

Open
ghost opened this issue Dec 17, 2022 · 1 comment
Open

Delete Comment is not working #1

ghost opened this issue Dec 17, 2022 · 1 comment

Comments

@ghost
Copy link

ghost commented Dec 17, 2022

While running "this.CommentRepo.deleteComment()" , Hibernate runs the below sql query but no delete query is run..is it a hibernate issue ?

Hibernate: select comments0_.post_post_id as post_pos3_1_0_, comments0_.id as id1_1_0_, comments0_.id as id1_1_1_, comments0_.content as content2_1_1_, comments0_.post_post_id as post_pos3_1_1_ from comment comments0_ where comments0_.post_post_id=?

Hibernate: select post0_.post_id as post_id1_2_0_, post0_.added_date as added_da2_2_0_, post0_.category_id as category6_2_0_, post0_.content as content3_2_0_, post0_.image_name as image_na4_2_0_, post0_.title as title5_2_0_, post0_.user_id as user_id7_2_0_, category1_.category_id as category1_0_1_, category1_.description as descript2_0_1_, category1_.title as title3_0_1_, comments2_.post_post_id as post_pos3_1_2_, comments2_.id as id1_1_2_, comments2_.id as id1_1_3_, comments2_.content as content2_1_3_, comments2_.post_post_id as post_pos3_1_3_, user3_.user_id as user_id1_3_4_, user3_.password as password2_3_4_, user3_.about as about3_3_4_, user3_.email as email4_3_4_, user3_.name as name5_3_4_ from post post0_ left outer join categories category1_ on post0_.category_id=category1_.category_id left outer join comment comments2_ on post0_.post_id=comments2_.post_post_id left outer join users user3_ on post0_.user_id=user3_.user_id where post0_.post_id=?

@ghost
Copy link
Author

ghost commented Dec 17, 2022

@LearnCodeWithDurgesh @DurgeshCoder Durgesh Bhaiya ... wrote a custom query in repo to make it work

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

0 participants