[Nitro] A few questions
David Corbin
dcorbin at machturtle.com
Mon Jun 20 16:45:33 EDT 2005
On Monday 20 June 2005 03:57 am, George Moschovitis wrote:
> Hello David,
>
> > 1) Something rubs me the wrong way about the application dynamically
> > creating the database schema as needed. In some environments, the db
> > user for the application may not even have permissions to create tables
> > and columns. Has any consideration been given to an option to simply
> > generate a schema generation script from the class information?
>
> this is in the TODO list (relatively easy to implement).
> > 3) Is there something magical about 'db', or does the Database object
> > effectively act like a singleton? How does the object know it's bound to
> > 'db'?
>
> there is nothing special with db, you can use any variable name you want.
I don't see where (in the tutorial), the classes are linked to a particular
database.
> > 4) When you save, how much does Og save? Mostly I'm interested in the
> > case of A has_one/many B. If I save A, will any dirty B objects be
> > saved?
>
> at the moment no. There is some code to do this but not yet enabled. A
> 'build' mode will be available in the next release.
This is really key. I think it should be a case of "has_" associations having
the ability to specify "traverse and save if dirty".
David
More information about the Nitro-general
mailing list