Chris, you are a bitch.
T
----- Original Message -----
From: Chris Cook
Sent: 6/10/2002 11:01:11 AM
To: [EMAIL PROTECTED]
Subject: [castor-dev] Beginner question
> I'm trying to map a Java class into two database tables and was wondering if
> that is supported using Castor.
>
> For example I have a Car class in Java that looks like
>
> public class Car{
> private int id;
> private String color;
> private String make;
> private String year;
>
> public String getColor(){...}
> public void setColor() {...}
> .
> .
> .
> }
>
> can that class map into the following database tables?
> table vehicle (
> id int not null,
> color varchar(200) not null
> );
>
> table car(
> id int not null, (foriegn key into vehicle)
> make varchar,
> year varchar
> );
>
> I know how it would look to one table, but not for two, for example
> <class name="Car" identity="id">
> <description>This is the car class</description>
> <map-to table="car" />
> <field name="id" type="int">
> <sql name="id" type="integer"/>
> </field>
> <field name="make" type="string">
> <sql name="make" type="varchar"/>
> </field>
> <field name="year" type="string">
> <sql name="year" type="varchar"/>
> </field>
> </class>
>
> So to repeat the question, can the avove listed Car class map to both the
> vehicle and car database tables
>
> Thanks for your help,
>
> Chris
>
> -----------------------------------------------------------
> 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