mysql virtual columns

45 views
Skip to first unread message

Leander Kurscheidt

unread,
Mar 10, 2016, 3:34:52 PM3/10/16
to jOOQ User Group
Hello,
i have virtual columns in my database and generated the representation from it. Inserting something where the value is set for the column will throw an error i guess, but will they work when i set them to null?
Leander

Lukas Eder

unread,
Mar 11, 2016, 3:07:31 AM3/11/16
to jooq...@googlegroups.com
Hi Leander,

jOOQ will only generate INSERT or UPDATE SQL code for columns that you explicitly set to a value. If you don't set any value for your generated columns, then jOOQ will not produce them in your INSERT statement (resulting in DEFAULT behaviour). If you explicitly set NULL, then jOOQ will also set NULL explicitly.

I'm not sure what the behaviour of virtual columns in MySQL is in that respect, but I think you shouldn't insert into them.

I hope this helps.
Lukas

--
You received this message because you are subscribed to the Google Groups "jOOQ User Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jooq-user+...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply all
Reply to author
Forward
0 new messages