Details
-
Type:
Sub-task
-
Status:
Closed
-
Priority:
Major
-
Resolution: Fixed
-
Affects Version/s: None
-
Fix Version/s: 1.0.4
-
Component/s: None
-
Labels:None
Description
RE: http://www.nabble.com/GORM-DSL-columnDefinition-or-sql-type--td18245961.html
Add the option to set the columnDefinition (sql-type) in the GORM DSL.
Something like this:
static mapping = {
columns {
location type:org.hibernatespatial.GeometryUserType, columnDefinition:'GEOMETRY'
}
}
This is called columnDefinition in JPA and sql-type in hibernate xml and a separate option from specifying 'type' that allows you to force the sql column definition when dialect mapping is insufficient.
For example,
<property name="location" type="org.hibernatespatial.GeometryUserType" >
<column name="LOC" sql-type="GEOMETRY"/>
</property>
and the equivalent annonations are:
@Column(name="LOC",columnDefinition="GEOMETRY")
@Type(type="org.hibernatespatial.GeometryUserType")
public Point getLocation(){...}
FYI more on this example of when its necessary :
http://www.nabble.com/No-Dialect-mapping-for-JDBC-type%3A-2003-td15459772.html#a15459772
Issue Links
| This issue is related to: | ||||
| GRAILS-3388 | Setting level "debug" on org.codehaus.groovy.grails.orm.hibernate causes NPE exception in GORM when using enums |
|
|
|
it'd be nice if GORM DSL supported all the mapping options.