2

So , in my application i have a entity with a virtual column. The column takes values depending on what i save in another column.

On save i have the following error:

java.sql.BatchUpdateException: ORA-54013: INSERT operation disallowed on virtual columns

This is because i am sending a null value on that field.

Does anybody know how to map a virtual column in gorm?

Thanks

MT0
  • 143,790
  • 11
  • 59
  • 117
ciker001
  • 57
  • 2
  • 5

2 Answers2

0

Grails derived properties might provide the functionality you need.

http://grails.org/doc/latest/guide/GORM.html#derivedProperties

user553180
  • 626
  • 5
  • 6
0

The extended GORM mappings plugins allows you to mark individual columns to be excluded from inserts and updates.

Example:

static mapping = {
    readOnlyColumn updateable: false, insertable: false
}
ataylor
  • 64,891
  • 24
  • 161
  • 189