Quick and dirty...

create your own class String (say ar.com.rifleman.String)
--------
package ar.com.rifleman
public class String extends java.lang.String {}
--------
then map it to a varchar(30)...

<type-mapping type="ar.com.rifleman.String" name="varchar(30)" />


that should do it (but again, it's quick and dirty)

JP

PS: Saludos de Claudio Paul Cannigia ;)
> -----Original Message-----
> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
> Sent: Lunes, 05 de Febrero de 2001 9:58
> To: Orion-Interest
> Subject: Anyone know how to def Data-type in cmp-field???
> 
> 
> > Hi!
> Hi people aroud the world!!!
> 
> I've found info about what I need to run Orion EJB 2.0 sample 
> with Interbase inside our Orion-list.
> 
> But for now, I'm having following trouble: primary keys, in 
> Interbase, allow only 254 bytes in length. If I configure my 
> datasource to use Interbase, and set schema="interbase.xml", 
> and then mapping Strings to VARCHAR(255), I get errors in 
> deployment time (primary key too long, or something like 
> this). To turn things bad, I want to use all Interbase power, 
> and map Strings to VARCHAR(8000)... How can I configure my 
> primary-keys to use a max of varchar(30), or something like 
> this? And, how I define the datasource that shold be used for 
> deployment (not after deployment)?
> 
> See, I need to configure inside ejb-jar.xml file the datatype 
> of my cmp-field (not in orion-ejb-jar.xml, because when Orion 
> create orion-ejb-jar.xml tables are created too - so my 
> database will be incorrect -> of course, I'll get app not 
> deployed, because interbase will refuse the primary key with 
> more than 254 bytes).
> 
> Anyone know how to do this???
> 
> 
> Thanks
> 

Reply via email to