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

Javers and SQL Server #796

Closed
Pinellus opened this issue Feb 26, 2019 · 4 comments
Closed

Javers and SQL Server #796

Pinellus opened this issue Feb 26, 2019 · 4 comments
Labels
bug Core Team This issue will be implemented by JaVers core team fixed

Comments

@Pinellus
Copy link

Hi,
with a QueryBuilder.byInstanceId, I get a SQL Exception on SQL Server:

SQL_EXCEPTION: An expression of non-boolean type specified in a context where a condition is expected, near 'ORDER'.
while executing sql:     SELECT state, type, version, changed_properties, managed_type, commit_pk, author, commit_date, commit_date_instant, commit_id, g.local_id, g.fragment, g.owner_id_fk, o.local_id owner_local_id, o.fragment owner_fragment, o.type_name owner_type_name FROM jv_snapshot INNER JOIN jv_commit ON commit_pk = commit_fk INNER JOIN jv_global_id g ON g.global_id_pk = global_id_fk LEFT OUTER JOIN jv_global_id o ON o.global_id_pk = g.owner_id_fk WHERE 1 = 1 and (  false) ORDER BY snapshot_pk DESC OFFSET ? ROWS FETCH NEXT ? ROWS ONLY

Can you help me?
Regards

@Pinellus
Copy link
Author

In depth:

Changes changes = javers.findChanges(QueryBuilder.byInstanceId(MyPK, MyClass.class).build() );

Here the JDBC PreparedStatement return a "WHERE 1 = 1 and ( false)" that is not compatibile with SQL Server

@bartoszwalacik
Copy link
Member

OK, l try to fix it, which is not easy because I don't have Oracle database at my fingertips.

@bartoszwalacik
Copy link
Member

see #801 (comment)

@bartoszwalacik
Copy link
Member

fix is released
5.2.6
https://search.maven.org/search?q=javers-core
check it out

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Core Team This issue will be implemented by JaVers core team fixed
Projects
None yet
Development

No branches or pull requests

2 participants