Note that there are some explanatory texts on larger screens.

plurals
  1. POGrails not generating the table because of longblob?
    primarykey
    data
    text
    <p>I've been stumped with this problem just now. Grails doesn't create the necessary table that I have specified in my domain. Here is what comes out of the command line after executing grails run-app:</p> <pre><code> [main] ERROR hbm2ddl.SchemaExport - Unsuccessful: create table image (id bigint generated by default as identity (start with 1), version bigint not null, content longblob not null, content_type varchar(255), description varchar(255), name varchar(255), product_id bigint, size bigint not null, type varchar(255) not null, primary key (id)) 2011-11-06 16:25:31,142 [main] ERROR hbm2ddl.SchemaExport - Wrong data type: LONGBLOB in statement [create table image (id bigint generated by default as identity (start with 1), version bigint not null, content longblob] </code></pre> <p>I believe this has something to do with my domain class. Can someone point me to the correct direction? I am using grails 1.3.7 and here is my domain class Image.groovy.</p> <pre><code>class Image { static belongsTo = Product Product product ImageType type String name String description byte[] content String contentType Long size static constraints = { product nullable: true content nullable: false contentType nullable: true, blank: true size min: 0L name nullable: true, blank: true description nullable: true, blank: true } static mapping = { content (sqlType: "longblob") } } </code></pre> <p>I am surprised because the static mapping worked with my other grails app. So It might be something else.</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload