Forum OpenACS Development: Re: package_id for acs_objects

Collapse
Posted by Timo Hentschel on
How should they inherit? and when? as i said, during install there is no package_id available - not even of "Main Site".
Collapse
Posted by Mark Aufflick on
this is a bogus idea, but here goes:

  • you make a temp table:

    ___________________________________
    | fake_pkg_id |    package_key    |
    +-------------+-------------------+
    |    -1000    |    acs-subsite    |
    |    -1001    |   acs-templating  |
    |     ...     |        ...        |
  • you use the fake package id's to populate the acs_objects table
  • as soon as package_id's exist, you reverse lookup the real package_id's using the package_key and replace the fake id's in acs_objects.
of course there is a limitation for packages mounted more than once during install, but if that (unlikely) event occurs, you could just use the first one and still be in a sensible position. it may be possible to even correctly deal with that situation, but i'm not too familiar on how package_id's are created during bootstrap.