incubator-empire-db-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From McKinley <mckinley1...@gmail.com>
Subject Re: Copy and Insert DBRecord (Urgent for me)
Date Fri, 15 Jan 2010 20:02:04 GMT
On Fri, Jan 15, 2010 at 7:42 PM, Rainer Döbele <doebele@esteam.de> wrote:
>
> I know it is tempting to use initRecord() but it has not been designed for doing what
you want to do.
> Rather it should be used for modifying existing records.

Thanks for your example! I ended up using getInsertInto() which took a
long time to learn how to use correctly. I think that Empire-db is the
best thing out there right now, but there is a whole other API that
could be build on top of it. I would like to come up with methods that
return better references and generally provide more convenience in
their arguments. After I have time to figure out the verbose areas of
my code, I'll present some ideas.

> IMO the right approach is to create a new record and copy all but pk and timestamp columns.

This should definitely go into a convenience method with optional
(keepPK, keepTs) arguments in the future. The best way to avoid using
the wrong method is by finding a more tempting one :)

Perhaps the best thing for now is to get a wiki for common query
examples. Is that possible at Apache?

Thanks again,

McKinley

Mime
View raw message