Re: Storing serialized object in MySql Database
Re: Storing serialized object in MySql Database
- Subject: Re: Storing serialized object in MySql Database
- From: Don Lindsay via Webobjects-dev <email@hidden>
- Date: Tue, 11 Aug 2020 08:26:57 -0400
The value entered for <b>Serial</b> is not a valid <b>?</b>.
ERXVaidationException
I have setup no Validation, so it must be Wonder or WebObjects base validation
that is throwing the error
> On Aug 10, 2020, at 18:20, Jesse Tayler <email@hidden> wrote:
>
> Did you list your error?
>
>> On Aug 10, 2020, at 6:08 PM, Don Lindsay via Webobjects-dev
>> <email@hidden <mailto:email@hidden>>
>> wrote:
>>
>> Hello;
>>
>> I have an app that the ucxstomer has asked to store specific serialized
>> objects into a MySQL database. I have stored serialized objects in MySQL
>> many times, at customer request. I get an error am trying to populate the
>> field with incorrect data type. The convertObject method is a standard
>> format method for serializing a java object. It is the same code we use for
>> converting objects to byte arrays in another application that uses jdbc.
>> The object is able to be serialized fine, but can’t be put into the column
>> and then saved to the database by EOF.
>>
>> The Code:
>> getSelectedTile().takeStoredValueForKey(Session.<TileStorage>convertObject(new
>> TileStorage(this)),"serial");
>>
>> Tile entity :
>>
>> attributes = (
>> {columnName = description; name = description; prototypeName = longText;
>> },
>> {
>> className = "java.lang.Number";
>> columnName = id;
>> externalType = INT;
>> name = id;
>> precision = 10;
>> valueType = l;
>> },
>> {columnName = name; name = name; prototypeName = longText; },
>> {
>> allowsNull = Y;
>> className = "com.webobjects.foundation.NSData";
>> columnName = serial;
>> externalType = BLOB;
>> name = serial;
>> width = 65535;
>> },
>> {
>> allowsNull = Y;
>> className = "com.webobjects.foundation.NSData";
>> columnName = tilejson;
>> externalType = BLOB;
>> name = tilejson;
>> width = 65535;
>> },
>> {
>> allowsNull = Y;
>> className = "com.webobjects.foundation.NSData";
>> columnName = visualization;
>> externalType = BLOB;
>> name = visualization;
>> width = 65535;
>> }
>> );
>> I have tried to set the classname of the serial field to the class being
>> stored but that does not work either. I figure if all else fails I can do
>> a RAW SQL and store the serialized object, but I would prefer that EOF
>> handle all that.
>>
>> Thanks in advance for any help.
>>
>> Don
>> _______________________________________________
>> Do not post admin requests to the list. They will be ignored.
>> Webobjects-dev mailing list (email@hidden
>> <mailto:email@hidden>)
>> Help/Unsubscribe/Update your Subscription:
>>
>> This email sent to email@hidden
>
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden