cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Amelie Cordier" <acord...@insa-rouen.fr>
Subject Re: Alias in database descriptor file
Date Wed, 11 Jun 2003 11:23:19 GMT
Thanks for your explantion... this is what I understood by reading the
wiki page... but the matter is it still doesn't work... I wonder if there
is an option to check in order to enable aliases or something like that...

And,by the way, I do want to modifiy the wiki page but I need to make it
work first... :)

Here is what I've done so far :

-- database.xml --


<table name="inscrit">
      <keys>
         <key name="id_1" type="int">
            <mode name="request-param" type="all"/>
         </key>
         <key name="id_2" type="int">
            <mode name="request-param" type="all"/>
         </key>
	 <key name="id_3" type="int">
            <mode name="request-param" type="all"/>
         </key>
         <key name="id_4" type="int" set="master">
            <mode name="request-param" type="all"/>
         </key>
      </keys>
      <values>
	 <value name="val1" type="int">
	    <mode name="request-param" type="all"/>
	 </value>
	 <value name="val2" type="string">
	    <mode name="request-param" type="all"/>
	 </value>
	 <value name="val3" type="float">
	    <mode name="request-param" type="all"/>
	 </value>
      </values>
   </table>


   <table name="inscrit" alias="inscrit2">
      <keys>
         <key name="id_1" type="int">
            <mode name="request-param" type="all"/>
         </key>
	 <key name="id_2" type="int">
            <mode name="request-param" type="all"/>
         </key>
         <key name="id_3" type="int">
            <mode name="request-param" type="all"/>
         </key>
	 <key name="id_4" type="int" set="master">
	    <mode name="request-param" type="all"/>
	</key>
      </keys>
      <values>
	 <value name="val1" type="int" set="slave">
	    <mode name="request-param" type="all"/>
	 </value>
	 <value name="val2" type="string" set="slave">
	    <mode name="request-param" type="all"/>
	 </value>
	 <value name="val3" type="float" set="slave">
	    <mode name="request-param" type="all"/>
	 </value>
      </values>
   </table>


<!-- ... -->

   <table-set name="saisie">
      <table name="inscrit2"/>
   </table-set>

   <table-set name="inscrit">
      <table name="inscrit"/>
   </table-set>

-- END database.xml --

The two descriptions work independently, I've check them both...but when 
they are together in the file, only the first one works ("inscrit").

Furthermore, there is something strange in the sitemap.log... I don't know
if it is really correct...

-- sitemap.log --
...
DEBUG   (2003-06-11) 12:57.12:274   [sitemap] (/cocoon/myappli/toto)
Thread-12/DatabaseAction: query: UPDATE inscrit SET val1= ?, val2= ?,
val3= ? WHERE id_1= ? AND id_2= ? AND id_3= ? AND id_4= ?
DEBUG   (2003-06-11) 12:57.12:275   [sitemap] (/cocoon/myappli/toto)
Thread-12/DatabaseAction: Trying to set column inscrit2.id_1 from
request-param using getAttribute method
...
-- END sitemap.log --

WHY "inscrit2" ???

Any ideas?

Thanks...
Amélie

> In a table-set you need to refer to tables by @name. This @name is used
> to create the SQL statements. However, you might need different views to
> a table (different number of columns, different keys) or even have
> injected a SQL expression into the @name like a join
> expression. In these cases you may refer to the @alias instead of the
> @name of a table. For the lookup, @name and @alias are
> equivalent. Search starts at the top and uses the first matching
> table.



> Could you have a look at the wiki page and modify it in a way you find
> the description better / extent it? That would really by great!



>
> Thanks.
>
> 	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
>
> --------------------------------------------------------------------- To
> unsubscribe, e-mail: cocoon-users-unsubscribe@xml.apache.org
> For additional commands, e-mail: cocoon-users-help@xml.apache.org




---------------------------------------------------------------------
To unsubscribe, e-mail: cocoon-users-unsubscribe@xml.apache.org
For additional commands, e-mail: cocoon-users-help@xml.apache.org


Mime
View raw message