« Return to Thread: UserType and tiny blob

Re: UserType and tiny blob

by Graeme Rocher-2 :: Rate this Message:

Reply to Author | View in Thread

It depends, you may need to drop and recreate the table, if the column
already exists it may not update the table to avoid loss of data

Cheers

On Fri, May 16, 2008 at 10:51 AM, olivier FRESSE
<olivier.fresse@...> wrote:

> Hi,
> I have a domain object defined as follow :
>
> class Question {
>
>     String name
>     String description
>     LinkedHashMap<String,AbstractParameter> params = new
> LinkedHashMap<String,AbstractParameter>(20)
>
>
>
>
>     static embedded = ['params']
>
>     static mapping = { params type: LinkedHashMapUserType }
>
>     static constraints={
>         params(maxSize:1048567)
>     }
>
>
> }
>
> To store the "params" attribute, I have my own hibernate  UserType.
>
> By setting the maxSize constraint, I expect the blob size of the "params"
> column  to be Medium, but it remains Tiny...
>
> So does the constraint mechanism drives the blob size in this case  ?
>
> Regards,
>
> Olivier.
>
>
>



--
Graeme Rocher
Grails Project Lead
G2One, Inc. Chief Technology Officer
http://www.g2one.com

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email


 « Return to Thread: UserType and tiny blob

LightInTheBox - Buy quality products at wholesale price