[Nitro] Nitro Week

George Moschovitis george.moschovitis at gmail.com
Mon Jul 16 02:35:07 EDT 2007

> OgModel#saved?
> This is determined by asking if the primary key is not nil.  This works
> fine
> as long as one uses autogenerated primary keys.  There's only one spec
> which
> touches that issue, and that spec uses .insert to get around that.

What is your proposal  ?

The next piece of the puzzle is:  .create
> In the current incarnation of .create it uses .insert to persist the
> object.
> (This was a recent change from me, in the last 15 patches).  Before it
> used
> .save which obviously breaks non-autogenerated pks.
> Now, with .insert a different problem crops up, autosaving of relations +
> .create blocks:
> OgModel.create(:foo) do |o|
>    o.some_attr = 'foo' # this is ok
>    o.some_rel = some_obj # this saves `o` in the background
> end
> So, what happens essentially with my .insert patch for .create, it tries
> to
> insert the object twice into the DB.  Once for autosaving, once in
> .create.
> Aurelianito (on irc) cought that issue, I've never used .create with a
> block
> so I'm grateful someone else does.
> There's 2 ways we can take here, either create a 'persisted' flag on each
> og object, or continue treating non-autogenerated pks as step-childs.
> (I myself will just continue using my .insert patch as I don't use blocks
> on .insert but many non standard pks.  But then again, my repo is quite
> different anyhow.  :P)
> So basically the issue here is the .saved? reacting on the 'wrong input'.
> What are we gonna do?

Hmm..this needs some thought...

> > I especially will need the help of Tom to fix some problems with Aspects
> and
> > try to get rid of Glue altogether.
> Just got an idea for glue so you don't have to make a gem for it even if
> it
> doesn't get removed:  just copy paste the glue parts in raw/nitro/og, just
> for the gems.

I think I will follow this tip.

BTW, I just talk we Tom. He proposed that we synchronize the release of
Nitro 0.50.0 with the release of Facets 2.0. I kind of agree. One of the
major features of 0.50.0 is that it catches up with the latest facets (1.8.0)
It would be not nice if one week after the release of Nitro, Facets jumped
again to a new version with a different structure. Plus it gives us some
more time.

I will postpone the Nitro week for a bit, but still I plan to work this week
on Nitro cleanup, bug fixing, and probably some new features (that I need
for my projects).


-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://rubyforge.org/pipermail/nitro-general/attachments/20070716/a563a1f3/attachment.html 

More information about the Nitro-general mailing list