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

Wrong types for NULL values when inserting data into postgres db #2353

Closed
pawmot opened this issue Aug 10, 2018 · 1 comment
Closed

Wrong types for NULL values when inserting data into postgres db #2353

pawmot opened this issue Aug 10, 2018 · 1 comment
Labels

Comments

@pawmot
Copy link

pawmot commented Aug 10, 2018

Instead of trying to explain the problem in details I have created a small project that shows it: https://github.com/pawmot/querydsl-bug-reproduction

In short: when having a table with a foreign key constraint (in my case to a dictionary table) and using subselect to get the Id of the dictionary row based on its value, then if there are INTEGER columns specified after the reference column that have null passed in values(...) call, then I get an exception similar to this: column "number2" is of type integer but expression is of type character varying.

In our project with get that exception on a SMALLINT column, here I was able to show the problem only on INTEGER column, I don't know exactly why. The problem can be circumvented by:
a) moving the reference column to the last position in columns(...) call.
b) using the populate(...) call.

If I'm doing something wrong, then please let me know, but I have tried to find something about this issue in documentation and I googled the problem without any success.

@stale
Copy link

stale bot commented Jun 3, 2021

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the wontfix label Jun 3, 2021
@stale stale bot closed this as completed Jun 10, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant