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 Bogdan Vatkov <bv...@globaltech-bg.com> on 2004/04/16 17:26:02 UTC
maven torque goal problem ? (plugin not installed ?)
Hi all,
I have done all the tasks that are described in Maven Howto from
http://db.apache.org/torque/maven-howto.html
and tried to generate om:
the result is the following:
H:\PROJECTS\GlobalServicesWeb\external\torque-gen-3.1>maven torque:om
__ __
| \/ |__ _Apache__ ___
| |\/| / _` \ V / -_) ' \ ~ intelligent projects ~
|_| |_\__,_|\_/\___|_||_| v. 1.0-rc2
BUILD FAILED
File...... file:/C:/Documents and Settings/bogdan/.maven/plugins/maven-torque-plugin-3.2-dev/plugin.jelly
Element... uptodate
Line...... 202
Column.... 82
H:\PROJECTS\GlobalServicesWeb\external\torque-gen-3.1\src\schema not found.
Total time: 5 seconds
Finished at: Fri Apr 16 18:22:34 EEST 2004
any clues ?
thanx in advance
bogdan
Re: one-many object mappings
Posted by sk...@engr.uky.edu.
Hi,
First I will explain what I understand of your question -
You have an entity X which has many Y refering to it
through a foreign key in Y. And you want to get all Y's
that refer to X as a List.
It THAT is what you wanted, there is already one such
function available in Torque. You can do X.getYs() and
it will return a List of all Ys that refer to X. This IS a "s" after the "Y" in
the function name. You can then do something like this-
List Ylist = X.getYs();
Iterator i = Ylist.iterator();
while (i.hasNext())
{
Y yobj = (Y) i.next();
/* Do something in yobj. */
}
Hope this helps.
~Sarav
Quoting Rob Gordon <rg...@mwt.net>:
> Hi--
>
> Anyone have any experience with one-many mappings in schema?
> Is it possible? Basically, I want something like getBasedOnForeignKey
> to return a List, not a single object.
>
> Rob
>
>
>
> ---------------------------------------------------------------------
> 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
RE: one-many object mappings
Posted by Daniel Huang <da...@cisco.com>.
If your table OBJ has a foreign key into table A, torgue will generate
A.getObjs() that returns a list of OBJs whose foreign key equals the primary
key of the A being called from.
Regards,
Daniel
-----Original Message-----
From: Rob Gordon [mailto:rgordon@mwt.net]
Sent: Monday, April 19, 2004 6:56 AM
To: Apache Torque Users List
Subject: one-many object mappings
Hi--
Anyone have any experience with one-many mappings in schema?
Is it possible? Basically, I want something like getBasedOnForeignKey
to return a List, not a single object.
Rob
---------------------------------------------------------------------
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
one-many object mappings
Posted by Rob Gordon <rg...@mwt.net>.
Hi--
Anyone have any experience with one-many mappings in schema?
Is it possible? Basically, I want something like getBasedOnForeignKey
to return a List, not a single object.
Rob
---------------------------------------------------------------------
To unsubscribe, e-mail: torque-user-unsubscribe@db.apache.org
For additional commands, e-mail: torque-user-help@db.apache.org