|Postgres inet type [message #980721]
||Sun, 11 November 2012 23:05
| Neikius Mising name
Registered: April 2011
So, using eclipselink and inet type is nicely cast to string when reading.|
But on insert something is wrong:
Caused by: org.postgresql.util.PSQLException: ERROR: column "..." is of type inet but expression is of type character varying
Hint: You will need to rewrite or cast the expression.
So I must override using descriptor customizer? Is kinda strange since I can insert into that column the IP as normal string.
This gets generated, nothing special (And it dies):
Call: INSERT INTO "table" (columns ...) VALUES (?, ?, ?, ?, ?, ?, ?)
bind => [7 parameters bound]
And this WORKS:
INSERT INTO "table" (columns ...)
VALUES (... '127.0.0.1' ...);
So when I call an ordinary query I can pass inet field as standard string and it all works. When a prepared statement it called via eclipselink and inet is bound as a string everything dies. A bug certiainly, but is there any workaround or a trick to make it work? Converter doesn't seem to work.
Powered by FUDForum
. Page generated in 0.29563 seconds