On 23 Oct 2006 02:59:30, Randal L. Schwartz <merlyn@stonehenge.com> wrote:
> If I recall correctly what John IM'ed me one day, once ->make_classes is
> called, the meta data has already been "used" to create everything else that
> is interesting.  You'll need to "initialize" again the parts of anything you
> change that the meta-data might have affected

Right.  Class setup is a two-step process.

1. Add the metadata.
2. Make methods and stuff based on that metadata.

If you go back to step 1, you then have to also do step 2 again.  If
you don't, then all you've done is altered the metadata, and not the
methods that (should be) made from it.

If you do step 2 more than once, however, you will probably need to
pass a flag that tells RDBO what to do when it finds itself recreating
a method that already exists.  The choices are: die, overwrite the old
method, or preserve the old method.  Check the docs for initialize(),
make_methods(), and friends to see relevant the flag names.

On 10/23/06, Ask Bjørn Hansen <[EMAIL PROTECTED]> wrote:
> $col->default('now') gets written out correctly in the class
> definition, but changes to $meta->alias_column and
> cached_objects_expire_in (and probably others) do not.

Hm, that may yet be a bug.  But try re-initializing after you mess
with the metadata, or use the pre_ or post_init_hook parameters to
make_classes() to mess with the metadata inside the call to
make_classes().

If you still can't get it to work, post a small, self-contained
reproduction of the bug and I'll look into it.

> So what you'll want is to figure out what shouldn't be initialized
> before you patch meta, then patch meta, then finally call *those*
> initialize methods.

That's one approach, yes, but as I said above, you can also
re-initialize() the entire class.  You just have to choose one of the
non-fatal policies for what to do when conflicts are encountered.

-John

-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Rose-db-object mailing list
Rose-db-object@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/rose-db-object

Reply via email to