Sanjib Karmakar
Sanjib Karmakar

Reputation: 357

Unsuccessful creation of table in Oracle

I am creating a domain class in my grails application.This is my domain class

class StatTiming {

Date startTime
Date endTime
Date date
double percentageOnTariff
AutoPosting autoPosting
Status status

static constraints = {
    startTime(nullable:false)
    endTime(nullable:false)
    date(nullable:false)
    percentageOnTariff(nullable:false)
    autoPosting(nullable:false)
    status(nullable:false)
}

enum Status{ACTIVE,INACTIVE}
enum AutoPosting{SERVICE_CHARGE,STAT_CHARGES,BOTH}

}

Its working fine in hsqldb, but when i change database to Oracle its failed to create the table. I need to work in Oracle not hsqldb. An error is generated called "ORA-00904: : invalid identifier". Can anyone please tell me what is the problem here?

Upvotes: 2

Views: 112

Answers (1)

Mat
Mat

Reputation: 206859

The problem is most likely with the field named date. That's a reserved word in Oracle.

(But without seeing the exact query, this is just a guess.)

Upvotes: 5

Related Questions