How to set type "time" with a model and ebean? -


i'd use time model, define when in day event going occur, way found :

@temporal(temporaltype.time) public date end; 

but i'd have in database, type time i'm looking for.

how can that?

thanks help!

you can use java.sql.time, careful - has other definition mysql time column type - operates in range 00:00:00 - 23:59:59 (although mysql allows store intervals -/+ 838 hours)

model:

public time end; 

set with:

event.end = time.valueof("12:15:00"); 

anyway maybe it's safer store time/interval string or integer (of minutes)?


Comments

Popular posts from this blog

java - Play! framework 2.0: How to display multiple image? -

gmail - Is there any documentation for read-only access to the Google Contacts API? -

php - Controller/JToolBar not working in Joomla 2.5 -