Source

Texa / grails-app / domain / com / koyanainc / bc / Post.groovy

package com.koyanainc.bc

class Post {

    Integer attachmentCount = 0
    ResponsibleParty author
    String body = ""

    //Category category
    Integer commentsCount = 0
    String extendedBody = ""

    Milestone milestone
    Date postedOn
    Project project

    String title
    Boolean useTextile = false

    static hasMany = [comments:Comment]

    static constraints = {
        author(nullable:false)
        //category(nullable:true)
        milestone(nullable:true)

        project(nullable:true)
        title(nullable:false)
        comments(nullable:true)
    }

    static mapping = {
        id generator: 'assigned'

    }

}