You are viewing a plain text version of this content. The canonical link for it is here.
Posted to torque-user@db.apache.org by Alexandru Dovlecel <al...@siemens.com> on 2004/03/19 15:58:16 UTC

Problem with separate schema files for one DB!!!!!

Houston, we have a problem. :(((

If splitting the schema in two separate schemas (modules), let's say A and
B, and A contains a table that references B then:
+ the classes for A module are generated correctly (complete)
+ the classes generated for B module have the following problem: don't have
the method to point to the table from the external schema.

As an example:

module A has table TableA.
module B has table TableB.
TableA has a foreign key to TableB (let's say fk).

ClassA contains a method getB().

THE PROBLEM: ClassB DOES NOT HAVE THE METHOD getAs() : List. :(((( Very bad
news.

This is normal to happen because when building the classes for module B,
there is no external-schema to moduleA, so the generator does not know the
id is referenced by a foreign key.

Only the moduleA has the external-schema defined, so it generates metods for
the tables related in module B.

This is a huge drawback when it comes to split the schema into several
smaller schemas. If you have some ideas, pls share!!!

I have to forget about splitting the schema file into several smaller files
and I am going to use a large schema file for all the DB. But now I have to
figure out how to generate separate packages from classes of the same
schema.

The next mail will contain a proposal to solve this problem, but this
includes changing the code and adding new functionality.

HIH,
Alex

> -----Original Message-----
> From: Alexandru Dovlecel [mailto:alexandru.dovlecel@siemens.com]
> Sent: Friday, March 19, 2004 4:19 PM
> To: 'Apache Torque Users List'
> Subject: RE: torque-gen multiple db ?
>
>
> Thanks,
>
> I think would be a good think to add an attribute to the
> table, allowing the
> developer to specify the package in which the class would be
> generated.
> Dunno if it's complicated to implement this functionality but
> could be a
> nice feature. IMHO... :)))
>
> 10x again
> Alex
>
> > -----Original Message-----
> > From: Bogdan Vatkov [mailto:bvatkov@globaltech-bg.com]
> > Sent: Friday, March 19, 2004 4:16 PM
> > To: Apache Torque Users List
> > Subject: Re: torque-gen multiple db ?
> >
> >
> > Yep, but you have to make some modifications to the templates
> > and of course to add some config to your build.properties file
> >
> > like this
> >
> > torque.targetPackageRoot = org.gt
> > torque.targetPackageCommons = ${torque.targetPackageRoot}.Commons
> > torque.targetPackageWeblication =
> > ${torque.targetPackageRoot}.Weblication
> > torque.targetPackageWeblicationCustomize =
> > ${torque.targetPackageWeblication}.Customize
> > torque.targetPackageLogic =
> > ${torque.targetPackageRoot}.ServicesImplemented.TemplatedDBCoverage
> > torque.targetPackageJavaBeans =
> > ${torque.targetPackageLogic}.WebComponents
> > torque.targetPackageApplication =
> > ${torque.targetPackageRoot}.Application
> > torque.targetPackage = ${torque.targetPackageRoot}.DataObjects
> >
> > you will have to modify the templates:
> > ....torque-gen-3.1\templates\om\*.vm
> >
> > not all of them of course ..
> >
> > regards,
> > bogdan
> >
> > ----- Original Message -----
> > From: "Alexandru Dovlecel" <al...@siemens.com>
> > To: "'Apache Torque Users List'" <to...@db.apache.org>
> > Sent: Friday, March 19, 2004 4:02 PM
> > Subject: RE: torque-gen multiple db ?
> >
> >
> > > Q: How can I generate files in separate packages? Is it
> > possible? E.g. the
> > > classes dealing with users in the package my.app.users and
> > the classes
> > > dealing with the shoping cart in package my.app.shopping ?
> > >
> > > Pls tell me if possible or not.
> > >
> > > 10q
> > > Alex
> > >
> > > > -----Original Message-----
> > > > From: Dave Newton [mailto:dave@solaraccess.com]
> > > > Sent: Friday, March 19, 2004 3:49 PM
> > > > To: Apache Torque Users List
> > > > Subject: Re: torque-gen multiple db ?
> > > >
> > > >
> > > > On Fri, 2004-03-19 at 03:58, Bogdan Vatkov wrote:
> > > > > Of course i have made some corrections in the torque runtime &
> > > > > torque-generator to successfully support the . (dot)
> > > > > inside tables names. but now i want to separate the
> > > > definition of each
> > > > > schema and place it in a separate file (xml file)
> > > >
> > > > Since it's all running under ant anyway, why not just
> > concatenate the
> > > > multiple-xml files into one xml file and then run the torque
> > > > generation
> > > > process normally?
> > > >
> > > > Dave
> > > >
> > > >
> > > >
> > > >
> >
> ---------------------------------------------------------------------
> > > > To unsubscribe, e-mail: torque-user-unsubscribe@db.apache.org
> > > > For additional commands, e-mail: torque-user-help@db.apache.org
> > >
> > >
> > >
> >
> ---------------------------------------------------------------------
> > > To unsubscribe, e-mail: torque-user-unsubscribe@db.apache.org
> > > For additional commands, e-mail: torque-user-help@db.apache.org
> > >
> >
> >
> >
> ---------------------------------------------------------------------
> > To unsubscribe, e-mail: torque-user-unsubscribe@db.apache.org
> > For additional commands, e-mail: torque-user-help@db.apache.org
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: torque-user-unsubscribe@db.apache.org
> For additional commands, e-mail: torque-user-help@db.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: torque-user-unsubscribe@db.apache.org
For additional commands, e-mail: torque-user-help@db.apache.org


EclipseDatabase

Posted by Xavier Maysonnave <xa...@omondo.com>.
Hi,

I am xavier, lead developer of EclipseDatabase from Omondo.

We have released our first qualified build for Eclipse 3.0 M7 today.

http://www.omondo.com/download/enterprise

Our plugin intend to be a native implementation of Torque tightly integrated within Eclipse.

Major features in this build
- Reverse
- Forward
- SQL Generator
- OM Code generator
- OJB Code generator
- Data export
- Tree view
- Diagram editor
- Multi Diagrams support per schema
- Diagram Auto-Layout
- and more ...

Feedback will be greatly appreciated.

Regards.

---------------------------------------------------------------------
To unsubscribe, e-mail: torque-user-unsubscribe@db.apache.org
For additional commands, e-mail: torque-user-help@db.apache.org