Saddly this feature (tentatively called 'build' mode) is not fully implemented.
I 'll try to add this, but perhaps someone could provide a patch. I am
extremeley busy
these days...
regards,
George.
On 9/14/05, Chris Farmiloe <chris.farmiloe at farmiloe.com> wrote:
>> Hi N.list
>> I have a little problem. I have a need to use some Entity(s) with
> their relationships without saving any of their state to a datastore.
>> I have not found this to be possible so far? Am I the only one who has
> a need for this functionality?
>> The only other way I can think of for achieving this end, is
> to .create all
> the instances I need and destroy them after they have been used/viewed
> ---this brings its own problems like wasted time writing to datastore
> and
> I have no idea how to run some code after the view is compiled....hrmm
> actually i think this is what the Compiler pipelining stuff is for.
> (sounds
> inelegant though)
>> Anyways ....Some help or thoughts on this would be cool...thanx?
>> chrisfarms.
>> [see example below]
>>> =======================> EXAMPLE <===================
> class Page
> property :title, String
> has_many :paragraphs, PageParagraph
> end
>> class PageParagraph
> property :content, String
> belongs_to Page
> end
>> #make new page (not using .create and without any calls to .save)
>> p = Page.new
>> #make a new paragraph
>> txt = PageParagraph.new
> txt.content = 'stuff stuff stuuff'
>> #assign the 'unsaved' paragraph to our new page
>> p.paragraphs << txt
>> #iterate through collection
>> p.paragraphs.each {|para| puts para.content }
> #------------> dies as it does a SELECT FROM using the non
> #------------> existent oid of the Page instance
>> ==========================> END EXAMPLE <===============
>>> _______________________________________________
> Nitro-general mailing list
>Nitro-general at rubyforge.org>http://rubyforge.org/mailman/listinfo/nitro-general>
--
http://www.gmosx.comhttp://www.navel.grhttp://www.nitrohq.com