[Nitro] [PATCH] Entity copying methods

vseguip at gmail.com vseguip at gmail.com
Fri Jan 27 10:58:01 EST 2006

Hi Robb,
  I was one of the requesters so thanks for your work! Some comments follow.

> Adds a .og_clone method to every entity which passes any arguments you
> supply onto the .new constructor when making the cloned object.
> The cloned object contains copies of all properties and all relations
> except HasMany which is impossible to copy as it involves modifying
> other objects BelongsTo relation, breaking the original relationship.
Wouldn't it be possible to recursively copy/clone the weak entity
(optionally)? That would make this patch perfect for my needs.

> BelongsTo/RefersTo etc (the inferior half of the relationship) will all
> copy ok, as will joins.

Do joins made through another Class also copy the join data? For example

class A
 joins_many B, :through =>C

class B
 joins_many A, :through =>C

class C

Will this also copy the join data contained in C?

A lot of thanks for your work Rob!

 V. Segui

More information about the Nitro-general mailing list