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

release-4.5.0 has line_number bug #2087

Open
gai410388544 opened this issue Jun 26, 2024 · 1 comment
Open

release-4.5.0 has line_number bug #2087

gai410388544 opened this issue Jun 26, 2024 · 1 comment

Comments

@gai410388544
Copy link

3A86F4AE-747E-45C5-EC40-67B9A337C885
C804C262-27A4-4AB2-D6FF-C6AF40A9C457

line 44 wrong mark as 46

@Saikiran8844
Copy link

Saikiran8844 commented Jul 20, 2024

Hi @gai410388544 looks like your updating existing table. The error in your query is due to the incorrect syntax for an INSERT statement. In SQL, you cannot have a WHERE clause with an INSERT statement. If you intend to insert a new record, the correct syntax. you can try the below

String query = "UPDATE users SET status = :status WHERE name = :name";
int result = session.createQuery(query)
                             .setParameter("status", "updated")
                             .setParameter("name", "data")
                             .executeUpdate();

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

2 participants