You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by Frank Taffelt <fr...@interface-business.de> on 2002/06/06 18:23:27 UTC

MOD-DB problem

Hi ,

it seems that new MODDB Actions doesn't alway's process the tables in the
right order.

In my understanding the processorder of the tables is determined by their
order in the table-set element.
Under some  circumstances this order is violated.

here a small example (snippet from database.xml):

<!-- working example -->
<table name="dataobject" alias="dataobject">
  ...
</table>
<table name="address" alias="address">
  ...
 </table>

<table-set name="Address">
    <table name="dataobject"/>
    <table name="address"/>
 </table-set>

this works for me.

<!-- no working example -->
<table name="address" alias="address">
  ...
 </table>
<table name="dataobject" alias="dataobject">
  ...
</table>

<table-set name="Address">
    <table name="dataobject"/>
    <table name="address"/>
 </table-set>

Only the order of tabledefinition is changed in these examples.
On Processing the "table-set" named "Address" first the table "address" is
processed afterthat the action works on table "dataobject".
I figured out that the table-definition order is important.

Is this the proper way to work  or a bug ?

frank


---------------------------------------------------------------------
Please check that your question has not already been answered in the
FAQ before posting. <http://xml.apache.org/cocoon/faqs.html>

To unsubscribe, e-mail: <co...@xml.apache.org>
For additional commands, e-mail: <co...@xml.apache.org>


Re: MOD-DB problem

Posted by Christian Haul <ha...@dvs1.informatik.tu-darmstadt.de>.
On 06.Jun.2002 -- 09:40 PM,  Christian Haul  wrote:
> Frank Taffelt wrote:
> >it seems that new MODDB Actions doesn't alway's process the tables in the
> >right order.
> >
> >In my understanding the processorder of the tables is determined by their
> >order in the table-set element.
> >Under some  circumstances this order is violated.
> 
> Mmmh, no. They are processed in table definition order. Always. Should 
> have been documented, I think. It stems from the fact that you could use 
> the action without any table-set -- then all tables would be used. This 
> is a) because the actions started as a patche :-) of the original 
> actions and b) for compatibility with them.
> 
> I agree, that it is desireable to control the order data is inserted. 
> Actually, it would make the setup even easier.
> 
> So, no its not a bug but a feature. Anyway, if no one objects I'm happy 
> to change that behaviour. I reckon that no-one relies on working without 
> table-sets anyway.

I've committed the change to HEAD. Behaviour without tablesets is
unchanged.

	Chris.

-- 
C h r i s t i a n       H a u l
haul@informatik.tu-darmstadt.de
    fingerprint: 99B0 1D9D 7919 644A 4837  7D73 FEF9 6856 335A 9E08

---------------------------------------------------------------------
Please check that your question has not already been answered in the
FAQ before posting. <http://xml.apache.org/cocoon/faqs.html>

To unsubscribe, e-mail: <co...@xml.apache.org>
For additional commands, e-mail: <co...@xml.apache.org>


Re: MOD-DB problem

Posted by Christian Haul <ha...@informatik.tu-darmstadt.de>.
Frank Taffelt wrote:
> it seems that new MODDB Actions doesn't alway's process the tables in the
> right order.
> 
> In my understanding the processorder of the tables is determined by their
> order in the table-set element.
> Under some  circumstances this order is violated.

Mmmh, no. They are processed in table definition order. Always. Should 
have been documented, I think. It stems from the fact that you could use 
the action without any table-set -- then all tables would be used. This 
is a) because the actions started as a patche :-) of the original 
actions and b) for compatibility with them.

I agree, that it is desireable to control the order data is inserted. 
Actually, it would make the setup even easier.

So, no its not a bug but a feature. Anyway, if no one objects I'm happy 
to change that behaviour. I reckon that no-one relies on working without 
table-sets anyway.

	Chris.


---------------------------------------------------------------------
Please check that your question has not already been answered in the
FAQ before posting. <http://xml.apache.org/cocoon/faqs.html>

To unsubscribe, e-mail: <co...@xml.apache.org>
For additional commands, e-mail: <co...@xml.apache.org>