Entity copy
I miss a feature for copying stored entity data to a new one without filling all manually in a Copy function like:
entity Address {
name : String
phone : Stringfunction Copy() : Address {
Submitted by Terje Pedersen on 2 May 2011 at 11:27
return Address(name=this.name, phone=this.phone);
}
}
Issue Log
How deep should that copy be? What if
Address
has a collection of persons, or a ref to another entity object, should that collection be duplicated, should the items in the collection be duplicated?
Good question, I think that would depend on the project. In my current project it seems like I need in one case copy all fields including references to other entities and duplicate all the collections. In another case I need copy of all fields, references and leave the collections empty like copying a blog entry without the comments attached to it.
Log in to post comments