Thanks for your help!
Rhett Sutphin
<rhett-sutphin@ To: [EMAIL PROTECTED]
uiowa.edu> cc:
Fax to:
20/11/2002 Subject: Re: [castor-dev] How to add a
"Type manager" to castor
17.48
Please respond
to castor-dev
Hi,
On Wednesday, November 20, 2002, at 05:48 AM, Andrea Saba wrote:
> Hi
> I need to add a new type of conversion to castor: is it possible?
> The conversion is from "integer" (sql) to aminformatica.KInteger.
> Please say me YES!
> Thanks
I have a way, but I don't know if it is the best way. Castor defines
all its internal conversions in org.exolab.castor.jdo.engine.SQLTypes.
You can add your own to that class; just create two new TypeConvertor
objects (one for converting from a SQL int to your type of int, and one
for doing the reverse).
You also must _not_ specify the type of the java field in the mapping
file. If you do, it won't work. See
http://www.mail-archive.com/[email protected]/msg09981.html and bug
1093 ( http://bugzilla.exolab.org/show_bug.cgi?id=1093 ) for related
info.
So far as I know, there is no programmatic way to specify
TypeConvertors. Maybe there should be.
Rhett
=====================================================
| Rhett Sutphin
| Research Assistant (Software)
| Coordinated Laboratory for Computational Genomics
| and the Center for Macular Degeneration
| University of Iowa - Iowa City, IA 52242 - USA
| 4111 MEBRF - email: [EMAIL PROTECTED]
=====================================================
-----------------------------------------------------------
If you wish to unsubscribe from this mailing, send mail to
[EMAIL PROTECTED] with a subject of:
unsubscribe castor-dev
-----------------------------------------------------------
If you wish to unsubscribe from this mailing, send mail to
[EMAIL PROTECTED] with a subject of:
unsubscribe castor-dev