[Nitro] [PATCH] many to many rich association handling non saved records

Judson Lester nyarly at gmail.com
Wed Mar 14 13:58:39 EDT 2007


Which is an interesting point:

Is there a policy level decision on how to treat unsaved objects?
Should they be silently saved whenever we need an oid for them?

My gut reaction is that it's not the right behavior.  It's confusing,
and as Og settles and matures, I'd lay odds that it becomes the most
frequent source of frustration for new and old hands.

A possibility that presents itself: adapt sequences from postgres to
autoincrement-only dbs (just a table with an auto-increment column),
and if we need an oid for an unsaved model object (and here, I want to
call them entities...) grab the next_sequence for that table, and
stick it in the oid.

Off the top of my head, one consequence would be that any
relation-following would need an adaptor class to find unsaved
destinations, so there's some complexity to not silently saving.

On 3/14/07, Antoniolo <antoniolo at gmail.com> wrote:
> In brief, join data wasn't being saved when handling non-saved records.
>
> _______________________________________________
> Nitro-general mailing list
> Nitro-general at rubyforge.org
> http://rubyforge.org/mailman/listinfo/nitro-general
>
>


-- 
Q: How does a hacker escape handcuffs?
A: Backslashes.


More information about the Nitro-general mailing list