Re: Sitegroup issue!

Tarjei Huse <tarjei-y/[email protected]> Tue, 07 Mar 2006 18:55:48 +0100
Newsgroups gmane.comp.web.midgard.devel
Message-ID <[email protected]>
Jukka Zitting wrote:
> Hi,
> 
> On 3/7/06, Tarjei Huse <tarjei-y/[email protected]> wrote:
>> Isn't this something you can say for most update operations that work on
>> links?
> 
> No. When you update a normal link property, the underlying database
> will remain consistent (well, it would if Midgard did check link
> constraints). There is also no way that an update of an object could
> cause links in *other* objects to break. But if you change the
> sitegroup of an object, then all the links that point to that object
> will suddenly break.
> 
> This is just one of the tricky issues that a setsitegroup() method
> needs to solve somehow. In fact I'd prefer not supporting sitegroup
> changes at all, if an object needs to be migrated from one sitegroup
> to another, couldn't it just be copied just like you'd do when
> migrating content from one database to another.
This is partly a chicken and egg problem. I need this to create 
sitegroups and hosts. Having a setsitegroup operation is a lot better 
than debugging strange errors in mgd_auth_midgard().


>> Is it possible for php to define some properties as read only - so that
>> you at least can get a notice when trying to set the sitegroup?
> 
> It would be possible if we defined the generic Zend getter and setter
> methods instead of copying property values back and forth from
> MgdSchema object properties to PHP object properties...

I guess that would imply $obj->get('att') ?
Tarjei

> BR,
> 
> Jukka Zitting
> 
> --
> Yukatan - http://yukatan.fi/ - [email protected]
> Software craftsmanship, JCR consulting, and Java development