Hi everyone!

First of all, before I forget I use symfony v. 1.2.9. Please, do not
suggest me to upgrade as my client's application is in use during the
holidays and I am going to update after the holiday's season
finishes. ;)

I think that my problem is quite simple, unfortunately the solution is
not :(

I have a class (based on schema.yml) TripTemplate. One of it's fields
is called `age_separation`, declared as longvarchar. In the admin
generator for TripTemplate I have created a partial to present the
age_separation as a set of 5 input texts (age_separation is to be a
comma-separated array, like "adult,12-18 years old,below 12 years
old". There is no problem of exploding the data before putting it to
appropriate fields on the edit page. However, I don't know where to
put an implode action before saving the data to the db. I tried to
override setAgeSeparation($v) method by checking if $v is an array and
if it is, then implode with ','.

However, this does not work. As far as I have checked, this method
(setter) is not even called while saving the object to db. The text
fields are named "trip_template[age_separation][$i]", so, after
casting this data to string it is saved as "Array".

I'm sure some of you had similar problems.

Regards

-- 
If you want to report a vulnerability issue on symfony, please send it to 
security at symfony-project.com

You received this message because you are subscribed to the Google
Groups "symfony users" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/symfony-users?hl=en

Reply via email to