> On Thu, Dec 06, 2001 at 06:29:47AM +0100, Gerald Richter wrote:
> > > is there any way for dbix '!Filter' to get one field in the database
> > > to correspond to multiple keys in the assoc array, or vice versa?
> > >
> >
> > Sorry, I don't understand what you mean. Can you give a short example ?
>
> in the database you have a "full name" field,
> but in your html form, you have "first name",
> "middle initial", and "last name".
>

Ok now it's clear to me. You should be able to do this, the filter is called
with the following parameters:

Update:  &{$if} ($val, 'update', $data, $where)
Insert:  &{$if} ($val, 'insert', $data)

$val is the field value and $data is a hash ref of the data passed to
Update/Insert, so you can take value from there to assemble the field value
you return.  You may also set the flags rqINSERT and/or rqUPDATE when
setting the filters, to make sure the filter is called anyway, also the
actual database field is not passed to Update/Insert.

Unfortunately there is no such thing for the other direction, also it should
be possible to do it (in function TIEHASH, about line 3711 in Recordset.pm)

Gerald



-------------------------------------------------------------
Gerald Richter    ecos electronic communication services gmbh
Internetconnect * Webserver/-design/-datenbanken * Consulting

Post:       Tulpenstrasse 5         D-55276 Dienheim b. Mainz
E-Mail:     [EMAIL PROTECTED]         Voice:    +49 6133 925131
WWW:        http://www.ecos.de      Fax:      +49 6133 925152
-------------------------------------------------------------



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to