Forum: Ruby on Rails cloning AR doesn't clone associations?

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
B9a732fc30c32098347a0177c75ee27b?d=identicon&s=25 jeroen (Guest)
on 2005-11-12 12:49
(Received via mailing list)
Hi,

Am I right in thinking that cloning an ActiveRecord does not close its
associations? If so, any particluar reason for this?

Jeroen
24d2f8804e6bb4b7ea6bd11e0a586470?d=identicon&s=25 jeremy (Guest)
on 2005-11-12 12:49
(Received via mailing list)
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On Nov 10, 2005, at 12:26 PM, Jeroen Houben wrote:
> Am I right in thinking that cloning an ActiveRecord does not close
> its associations? If so, any particluar reason for this?

Because how deep you go in the object graph is application-specific.

jeremy
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.2 (Darwin)

iD8DBQFDc7XSAQHALep9HFYRApnBAJwNP7C1rsbS+LZ7SV2TCgsNz3c+eQCgjtk/
bV5tQhZrm9GW7g//HfllpNI=
=9w0M
-----END PGP SIGNATURE-----
B9a732fc30c32098347a0177c75ee27b?d=identicon&s=25 jeroen (Guest)
on 2005-11-12 12:49
(Received via mailing list)
Jeremy Kemper wrote:

> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> On Nov 10, 2005, at 12:26 PM, Jeroen Houben wrote:
>
>> Am I right in thinking that cloning an ActiveRecord does not close
>> its associations? If so, any particluar reason for this?
>
>
> Because how deep you go in the object graph is application-specific.

Okay. Makes sense. Perhaps this can be added to the API docs.

Thanks for your help!

Jeroen
24d2f8804e6bb4b7ea6bd11e0a586470?d=identicon&s=25 jeremy (Guest)
on 2005-11-12 12:49
(Received via mailing list)
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On Nov 10, 2005, at 1:22 PM, Jeroen Houben wrote:
> Jeremy Kemper wrote:
>> On Nov 10, 2005, at 12:26 PM, Jeroen Houben wrote:
>>> Am I right in thinking that cloning an ActiveRecord does not
>>> close  its associations? If so, any particluar reason for this?
>>
>> Because how deep you go in the object graph is application-specific.
>
> Okay. Makes sense. Perhaps this can be added to the API docs.

Sure: http://dev.rubyonrails.org/changeset/2975

jeremy
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.2 (Darwin)

iD8DBQFDc76OAQHALep9HFYRAnLUAKCImfKrN48GHV8qb3oBPo6d4MgJ+QCeNFKp
/Ar7DUAkGf5R2QF+WyHW7MA=
=eReL
-----END PGP SIGNATURE-----
This topic is locked and can not be replied to.