I am using the play framework along with jooq to autogenerate my 
datatable,dao, and pojo objects.  When creating a form for the page to post 
data using the form helpers from play, I can validate the form that was 
posted and save the record if no validation errors were found.  The issue 
I'm having is dealing with an edit page where I have mapped 2 database 
fields for createdDate and modifiedDate which are timestamps in a mysql DB. 
 

When I validate the form that is bound from the request parameters, it has 
errors for the created and modified fields.  These fields in the textbox 
are shown as mm/dd/yyyy without a time element to it, so I assume that the 
play framework request binder isn't able to bind from a string date to the 
timestamp type, or I'm doing something wrong.

Before I get into a specific question, I would rather solve this problem 
the right way, is using a timestamp the wrong solution?
Is it typically best practice to make the created and modified dates 
DateTime?

When I added the following code to my jooq xml I've was able to work around 
the validation issue because my pojo no longer had the fields for created 
and modified:

<includeExcludeColumns>true</includeExcludeColumns>

<excludes>created|modified</excludes>


The issue with the solution is that I can now save and get pass the 
validation issues, but now the queries where I needed the value for 
created/modified dates no longer work because the generated classes no 
longer have those properties.  I feel I have went through the documentation 
and searched far and wide to handle such a simple case, but I can't seem to 
find any sample that demonstrates or suggest the best way to handle this.


Any help would be greatly appreciated

Thanks

-- 
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 [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to