1 Reply Latest reply on Jan 14, 2008 7:42 AM by Matthias Besemer

    Problems with @Past validator

    Matthias Besemer Newbie


      I use Hibernate as JPA implementation with JBoss Seam. The underlying database is MS SQLSERVER 2000. Recently I added Hibernate Validation and used the builtin @Past validator. But since then, a few tables where no longer generated with hbm2ddl. Then I detected that all tables those tables used an @Past annotation on a field:

      10:04:57,375 INFO [SchemaExport] Running hbm2ddl schema export
      10:04:57,375 INFO [SchemaExport] exporting generated schema to database
      10:04:57,437 ERROR [SchemaExport] Unsuccessful: create table Lizenz ([...], erwerbsDatum datetime not null check (erwerbsDatum < current_date), [...])
      10:04:57,437 ERROR [SchemaExport] Falsche Syntax in der Naehe des current_date-Schluesselwortes. [<- means in English: 'wrong syntax near current_date keyword']
      10:04:57,828 INFO [SchemaExport] schema export complete

      Is this a bug in Hibernate Validator or hbm2ddl? Probably in association with MS SQLSERVER?

      Best Regards, Matthias