On Mon, Oct 08, 2001 at 05:58:01PM +0200, Heine, Dieter wrote: > hello alexander, > > though I thank you for your precise explanation, I still don't think we > mean the same id. > > > and we have GUID unique as well, so at the 'repligard' table new mapping > > is created -- between GUID and newly generated autoincremental ID. Thus, > > uniqueness is maintained. > > > > the sitegroup id is not auto_incremented. Do we speak of the same id ? Yes. Your assumptions below are wrong because every table in Midgard (and 'sitegroup' table isn't an exception) has autoincremented primary key.
> > CREATE TABLE topic ( > > id int(11) DEFAULT '0' NOT NULL auto_increment, > ^^^^^^^^^^^^^^^^ > record id > > > up int(11) DEFAULT '0' NOT NULL, > [.........] > > code longtext NOT NULL, > > sitegroup int(11) DEFAULT '0' NOT NULL, > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ > sitegroup id or value You can't assign value to this attribute of topic without giving into account real records in 'sitegroup' table. This value (topic.sitegroup) is a link to real record in 'sitegroup' table with the same id (sitegroup.id) as this value, i.e. topic.sitegroup = sitegroup.id for given id. > > different GUID, Repligard will treat them as different entities. > > > > The sitegroup id as an attribute that may be the same between the one > existing on the target db before the import and the one beeing imported. > You explain that repligard treat those as different entities. But what > (value) is the sitegroup value of the newly imported sitegroup ? > Doesn't it change ? If the a sitegroup with the same value already > existed on the target then we may have two sitegroups on the target with > different GUID but the same sitegroup value. I'm talking about sitegroups as resources themselves (what they actually are in Midgard). You're trying to say about links to particular sitegroup using its unique ID in 'sitegroup' table. These links are visible in other tables as 'sitegroup' field of record. Repligard ensures that sitegroup (which is specified in XML file by its GUID) exists on the target by GUID, not ID. It converts GUID to ID then using already existing table 'repligard' on the target and uses resulting value as value of sitegroup field in corresponding resource record. Actually, sitegroups aren't that different from other types of resources in Midgard from Repligard's point of view. All of them are handled similary. -- / Alexander Bokovoy $ cat /proc/identity >~/.signature `Senior software developer and analyst for SaM-Solutions Ltd.` --- No one can put you down without your full cooperation. --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
