From: Sven Schöling Date: Wed, 23 Feb 2011 16:56:38 +0000 (+0100) Subject: Dokumentationsupdate. X-Git-Tag: release-2.7.0beta1~396^2~74 X-Git-Url: http://wagnertech.de/git?a=commitdiff_plain;h=8a635325ad558d18a2c6930a67e14f5312e91424;p=kivitendo-erp.git Dokumentationsupdate. --- diff --git a/SL/Helper/Csv.pm b/SL/Helper/Csv.pm index 82e570115..092ba37e8 100644 --- a/SL/Helper/Csv.pm +++ b/SL/Helper/Csv.pm @@ -55,7 +55,6 @@ sub parse { $self->_open_file; return if ! $self->_check_header; return if ! $self->dispatcher->parse_profile; -# return if $self->class && ! $self->_check_header_for_class; return if ! $self->_parse_data; $self->_parsed(1); @@ -290,6 +289,22 @@ May be used to map header fields to custom accessors. Example: In this case C will be used to read in values from the C column. +In case of a One-To-One relationsship these can also be set over +relationsships by sparating the steps with a dot (C<.>). This will work: + + { customer => customer.name } + +And will result in something like this: + + $obj->customer($obj->meta->relationship('customer')->class->new); + $obj->customer->name($csv_line->{customer}) + +But beware, this will not try to look up anything in the database. You will +simply receive objects that represent what the profile defined. If some of +these information are unique, and should be connected to preexisting data, you +will have to do that for yourself. Since you provided the profile, it is +assumed you know what to do in this case. + =item C If present, the line will be handed to the new sub of this class,