This shows you the differences between two versions of the page.
|
core_faq [2010/02/27 01:39] pponec |
core_faq [2010/03/07 23:19] (current) pponec |
||
|---|---|---|---|
| Line 35: | Line 35: | ||
| A: Use the next code: | A: Use the next code: | ||
| <code jave> | <code jave> | ||
| - | Person oldUser = createPerson(); | + | Person from = getPerson(); |
| - | Person newUser = new Person (); | + | Person to = new Person (); |
| for (UjoProperty p : newUser.readProperties()) { | for (UjoProperty p : newUser.readProperties()) { | ||
| - | newUser.writeValue(p, oldUser.readValue(p)); | + | p.copy(from, to); |
| } | } | ||
| </code> | </code> | ||