`update_time` TIMESTAMP NULL DEFAULT CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP,
PRIMARY KEY (`host_id`, `region`))
I generate via mvn mybatis-generator:generate but when the program runs, Mybatis clobbers the create_time and update_time to NULL. It looks like there is an Ignore option available in the XML BUT I want to query with these field. As a workaround I can commented out these fields for create_time and update_time in the XML insert and update functions, then the code worked fine. But I'd rather not have to hack and rehack these autogenerated files every time. Given I didn't find anything on this topic either way, I suspect I am missing something basic as I am new to Mybatis. Could anyone provide any enlightenment?
Here's the XML for the Generator if it helps:
<?xml version="1.0" encoding="UTF-8"?>
PUBLIC "-//mybatis.org//DTD MyBatis Generator Configuration 1.0//EN"
You received this message because you are subscribed to the Google Groups "mybatis-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/d/optout.