You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cocoon.apache.org by Frank Taffelt <fr...@interface-business.de> on 2002/07/22 13:40:51 UTC
modular database action - hide null values on update
Hi,
does it make sense to hide values for which the input-module gives null as
result ?
maybe the descriptor file can contain a nullable attribute for the these
column's (of course only for values not for keys):
<table name="emailaddress" alias="emailaddress" label="Email">
<keys>
...
</keys>
<values>
<value name="kindofuse" type="string"></value>
<value name="locator" type="string"></value>
<value name="notes" type="string" nullable="true"></value> <! --
optional field -->
</values>
</table>
why this ?
the current behaviour forces you to feed each value, for each row being
updated, into the request as a hidden parameter. If i leave the fields
blank or more likely they don't exist- the update statement overrides
existing values with null.
Frank
---------------------------------------------------------------------
To unsubscribe, e-mail: cocoon-dev-unsubscribe@xml.apache.org
For additional commands, email: cocoon-dev-help@xml.apache.org
Re: modular database action - hide null values on update
Posted by Christian Haul <ha...@dvs1.informatik.tu-darmstadt.de>.
On 22.Jul.2002 -- 01:40 PM, Frank Taffelt wrote:
> Hi,
>
> does it make sense to hide values for which the input-module gives null as
> result ?
Since the query is generated the first time and stored for reference,
it would mean to assemble the query every time. So no, I think it
doesn't make sense.
> why this ?
> the current behaviour forces you to feed each value, for each row being
> updated, into the request as a hidden parameter. If i leave the fields
> blank or more likely they don't exist- the update statement overrides
> existing values with null.
Exactly. But you could use another InputModule i.e. DefaultsMetaModule
to provide default values in such cases. Or create a different view to
the table that does not include extra values.
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-dev-unsubscribe@xml.apache.org
For additional commands, email: cocoon-dev-help@xml.apache.org