Open GoogleCodeExporter opened 9 years ago
Actually, there is a bit of a hack you can do that makes it so you don't need
to copy the fields over to the second object.
Simply setting the database on your user object:
User u = new User("john", "smith");
u.setDatabase(dbb);
u.save();
It's still 3 lines, but it saves on unnecessary object creation.
I personally don't like the copying an object to another, especially if the
object you are copying over to is an ActiveRecordBase subclass.
I have a fork on github under the same name, with some newly added features.
Criticism would be greatly appreciated :)
Original comment by c.saunde...@gmail.com
on 18 Feb 2011 at 2:49
Original issue reported on code.google.com by
michal.r...@gmail.com
on 11 Feb 2011 at 3:45