mercredi 3 juin 2015

MySQL datetime comparison in jpa

i want to translate this statement :

select * from email where Dateenvoi >= NOW() - INTERVAL 1 DAY

to it's equivalent in jpa (i'm using hibernate)

i wright this it doesn't work :

            select u
              from Mail u
             where u.vue = 0 And
             Dateenvoi >= NOW() - INTERVAL 1 DAY

Aucun commentaire:

Enregistrer un commentaire