Matthew Koranda typed the following on 05:33 PM 3/15/2002 +0100
>When I want to create a 'text' datatype for mySQL I've found that I need to
>set the column type in the schema to VARBINARY which maps top a mediemblob.
>I want to make the simplest possible insert function to insert my forms in
>the database
I ran into the same situation, what I do is add accessor methods to the object
(in the customized Foo.java file which extends the Torque-generated BaseFoo.java)
which are used for converting to/from Strings from/to bytes. Here's an example for
a field called "summary":
/**
* Get the Summary as a String
*/
public String getSummaryText()
{
byte[] summary = getSummary();
if (summary != null)
return new String(summary);
else
return null;
}
/**
* Set the value of Summary with a String
*/
public void setSummaryText(String v)
{
setSummary(v.getBytes());
}
My forms use fields named "summaryText", so ParameterParser uses the
custom accessor methods, and everything works silky smooth.
Kief
--
To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>