Hello Raphael, couldn't resist answering your question. I am a married man, and 
I sure look forward to have a 1:1 relation between clearly differentiated 
"objects" (i.e. persons) :)
 
Best regards everyone,
 
Álvaro Coronel.

Raphael Mankin <[EMAIL PROTECTED]> wrote:
Make the FK a unique attribute, then there can be only one 'child' of a given
parent.


But why do you want a 1:1 at all? Surely if two objects are 1:1 then they are
two parts of the same object -- unless one part is optional.



On 01-Jul-2005 Thomas Fischer wrote:
> 
> 
> 
> 
> 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" 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: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]

-- 
Lead us not into temptation; we
can find our own way.


Raphael Mankin
----------------------------------

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


                
---------------------------------
Yahoo! Mail
 Stay connected, organized, and protected. Take the tour

Reply via email to