Results 1 to 2 of 2

Thread: org.joda.time.Instant validator issue

Hybrid View

  1. #1
    Join Date
    Feb 2013
    Posts
    4

    Default org.joda.time.Instant validator issue

    Hi,


    I am new to Grails, I generated Domain for one table and made changes to set org.joda.time.Instant object to DateTime column of mysql database.

    Domain :

    import org.joda.time.*
    import org.hibernate.validator.constraints.*
    import javax.validation.constraints.*

    abstract class ManagersDomain {

    @NotBlank
    Instant createdDateTime

    static constraints = {

    }

    }

    While inserting new record or updating existing records I am getting following exception,

    HV000030: No validator could be found for type: org.joda.time.Instant.. Stacktrace follows:
    Message: HV000030: No validator could be found for type: org.joda.time.Instant.


    How can I overcome this issue,

    can you anyone please provide suggestion, where I am doing mistake.


    Thanks

    Ravindar

  2. #2
    Join Date
    Feb 2013
    Posts
    4

    Default

    Hi,


    I have used @NotNull annotation, it is working fine.

    @NotBlank
    Instant createdDateTime



    Thanks

    Ravindar

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •