Hi CP

I apologize for contacting you directly but my posts to the list on this
topic have fallen on blind eyes...

Judging from this post you made, you seem to have a fairly ample
understanding of idMethod options used in the xml schema files.  My
question is two-part: 1)  Could you direct me to resources on this
topic? 2) If you cant direct me to documentation, could you give me a
brief description of what each option entails?  

All of the doc I have found on the jakarta site is sub-par, and there
arent a whole lot of comments in the DTD file to adequately explain what
each option means.

If you have any aid to offer, I would appreciate it! :)

Thanks

-bill

On Thu, 2002-10-24 at 18:53, CP Lim wrote:
> Hi Vera,
> 
> On your idbroker question, I'm wondering whether or not it would be 
> appropriate to use a sequence instead.  I'll show you what I mean(I'm 
> using postgresql, so my proposal will be mired on that platform):
> 
> XML schema:
> -------------------------------------------------------------------------
> <!-- table1 -->
> <table name="table1" idMethod="native">
>      <column name="id" type="integer" required="true" primaryKey="true"/>
>      ... <!-- more columns -->
> 
>      <id-method-parameter value="table_sequence"/>
> </table>
> 
> <!-- table2 -->
> <table name="table2" idMethod="native">
>      <column name="id" type="integer" required="true" primaryKey="true"/>
>      ... <!-- more columns -->
> 
>      <id-method-parameter value="table_sequence"/>
> </table>
> -------------------------------------------------------------------------
> 
> What this does is it tells torque that my 'id' column in both 'table1' 
> and 'table2' (the primrary keys) will use the sequence called 
> 'table_sequence'.
> 
> If I'm not wrong, you should get the following database schema generated:
> 
> -------------------------------------------------------------------------
> create table table1
> (
>      id integer default nextval('table_sequence'::text),
>      ... -- more columns
>      primary key (id)
> );
> 
> create table table2
> (
>      id integer default nextval('table_sequence'::text),
>      ... -- more columns
>      primary key (id)
> );
> -------------------------------------------------------------------------
> 
> I haven't tried it out, but I believe that the above tables (an OM 
> classes) should be generated.
> 
> Hope it helps,
> CP
> 
> Vera Neupert wrote:
> > Hi Jonas,
> > 
> > apart from your reply I didn't get any others on these two questens. But for
> > the first I found an old mail in the list saying it is not possible. I could
> > build om classes in different packages using different build.properties. But
> > as soon as there are relations between the table classes (om) they have to
> > be in the same schema.
> > 
> > I found nothing to the IdBroker question. I guess I could overright the
> > IdBroker and IdGenerater classes. But it seems to be easier to set the
> > idmethode=none and implement MyIdBroker(a Singelton) with the method
> > nextId() and set the primary keys explizit before I save the om class.
> > 
> > Vera
> > 
> > 
> >>-----Urspr�ngliche Nachricht-----
> >>Von: Jonas Denvall [mailto:jonas@;mondao.com]
> >>Gesendet: Mittwoch, 23. Oktober 2002 12:42
> >>An: 'Turbine Torque Users List'
> >>Betreff: Re: different packages & IDBroker
> >>
> >>
> >>Hi Vera!
> >>
> >>I noticied that you published two very interesting questions on the
> >>Turbine Torque Users List, but that you didnt get any replies.
> >>
> >>The questions where:
> >>1) Is it possible to generate the table OM classes into different
> >>packages, with foreign keys between them?
> >>2) Is it possible to use the IDBroker to share a sequence of ID's
> >>between multible tables? If not, is it possible to extend the IDBroker
> >>with that functionality?
> >>
> >>I'm looking for answers to those questions myself! How did you progress
> >>- did you find any answers?
> >>
> >>Thanx
> >>/Jonas
> >>
> >>-----Ursprungligt meddelande-----
> >>Fr�n: Vera Neupert [mailto:vn@;fnt.de]
> >>Skickat: den 22 oktober 2002 09:17
> >>Till: Turbine Torque Users List
> >>�mne: AW: different packages
> >>
> >>
> >>Thanks thats right but what I meant was to spezify more than one package
> >>and
> >>link different "tableclasses" placed in different packages with foreigen
> >>keys.
> >>But this seems not to work.
> >>
> >>Vera
> >>
> >>
> >>>-----Urspr�ngliche Nachricht-----
> >>>Von: Joe McGlynn [mailto:joe.mcglynn@;nuasis.com]
> >>>Gesendet: Montag, 21. Oktober 2002 17:44
> >>>An: 'Turbine Torque Users List'
> >>>Betreff: RE: different packages
> >>>
> >>>
> >>>I believe the build property:
> >>>   torque.Targetpackage=
> >>>is what you're looking for.
> >>>
> >>>-----Original Message-----
> >>>From: Vera Neupert [mailto:vn@;fnt.de]
> >>>Sent: Monday, October 21, 2002 2:57 AM
> >>>To: [EMAIL PROTECTED]
> >>>Subject: different packages
> >>>
> >>>
> >>>Hello folks,
> >>>
> >>>is there a way to store my database classes in different packages?
> >>>
> >>>Vera
> >>>
> >>
> >>
> >>--
> >>To unsubscribe, e-mail:
> >><mailto:turbine-torque-user-unsubscribe@;jakarta.apache.org>
> >>For additional commands, e-mail:
> >><mailto:turbine-torque-user-help@;jakarta.apache.org>
> >>
> >>
> >>--
> >>To unsubscribe, e-mail:
> >><mailto:turbine-torque-user-unsubscribe@;jakarta.apache.org>
> >>For additional commands, e-mail:
> >><mailto:turbine-torque-user-help@;jakarta.apache.org>
> >>
> >>
> > 
> > 
> > --
> > To unsubscribe, e-mail:   
><mailto:turbine-torque-user-unsubscribe@;jakarta.apache.org>
> > For additional commands, e-mail: 
><mailto:turbine-torque-user-help@;jakarta.apache.org>
> > 
> > 
> > 
> 
> 
> -- 
> R E D S H E R I F F
> C.P. Lim - Software Engineer
> Level 1, 10 Queens Road    +61 3 9864 0733 tel
> Melbourne VIC              +61 3 9864 0778 fax
> Australia                  +61 413 781 846 mob
> 
> This message and any files transmitted with it are confidential and 
> intended solely for the use of the individual or entity to whom they are 
> addressed. If you are not the intended recipient, you are hereby 
> notified that any use or dissemination of this communication is strictly 
> prohibited. If you have received this message in error please notify us 
> immediately by return email or telephone +61 (3) 9659 0432, then delete 
> this message. Any views expressed in this message are those of the 
> individual sender and many not necessarily reflect the views of Red 
> Sheriff.
> 
> 
> --
> To unsubscribe, e-mail:   <mailto:turbine-torque-user-unsubscribe@;jakarta.apache.org>
> For additional commands, e-mail: <mailto:turbine-torque-user-help@;jakarta.apache.org>
> 



--
To unsubscribe, e-mail:   <mailto:turbine-torque-user-unsubscribe@;jakarta.apache.org>
For additional commands, e-mail: <mailto:turbine-torque-user-help@;jakarta.apache.org>

Reply via email to