db-torque-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Thomas Fischer <fisc...@seitenbau.net>
Subject RE: one-to-one relation
Date Fri, 01 Jul 2005 12:29:19 GMT




Hi,

1:1 and n:m relations are not supported out of the box by Torque, as far as
I know.

However, as a 1:1 relation is a special case of a 1:n relation, there
should be no real problems there. Only thing you have to do is verify that
one object is referenced only by one other object. You can e.g.
- override the setter methods to allow only one Element
- add a unique constarint to the foreign key in the db

   Thomas

"Rafael Coscolla" <rcoscolla@tissat.es> schrieb am 01.07.2005 14:10:36:

> Hi,
>
>
>
> does anyone know how to implement a one-to-one relation between two
> tables with torque?.
>
>
>
> I hoped to find an attribute, in the foreign key element of the torque
> schema, to indicate the cardinality (one-too-many is created by default)
> of the relation but I haven't found it.
>
>
>
>
>
> Thanks in advance !!
>
>
>
> Rafa
>
>
>
------------------------------------------------------------------------------------------------------------------------------------

> Nota Legal: Este correo electronico puede contener informacion
> estrictamente confidencial y es de uso exclusivo del destinatario,
> quedando prohibida a cualquier otra persona su revelacion, copia,
> distribucion, o el ejercicio de cualquier accion relativa a su
> contenido. Si ha recibido este correo electronico por error, por
> favor, conteste al remitente, y posteriormente proceda a borrarlo de
> su sistema. Gracias por su colaboracion.
>
> Confidentiality notice: This e-mail message may contain confidential
> and/or legally privileged information and is solely for the
> attention and use of the intended recipient. Any disclosure,
> copying, distribution or the taking of any action with relation to
> the contents of this e-mail by any other person is strictly
> prohibited. If you believe that this e-mail has been mistakenly sent
> to you, please reply to the sender from whom you received the
> message in error and then delete the original e-mail from your
> system. Thank you for your co-operation.
>
------------------------------------------------------------------------------------------------------------------------------------

>


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


Mime
View raw message