Hey Wallaby,

I don't know how to help you with the dump process but you could  
always save your data in a different way. Convert you hexadecimal  
string to color percentage values and save those in your database. In  
your model you would overwrite the method getColor to reconvert the  
value to a hexadecimal value.

Kind regards,

Marijn

On Oct 22, 2008, at 2:32 PM, wallaby wrote:

>
> I created a new ticket, however who knows wen it gets ever read...
>
> This now has become blocking issue for me.
> I should have hundreds, thousands of records soon in database
> containing color values.
> I tried to append # to the beginning of the color value:
> CsfColor_2:
>   code: #000080
>
> In this case Symfony doesn't take the code value at all and tries to
> insert an empty value instead of "something" :(
>
> In must be quoted anyway so please, anyone knows how to force Symfony
> to quote string values during the dump process?
>
> Such a simple thing turns ot to be such a problem...
>
> Thanks in advance!
>
> On Oct 20, 12:19 pm, "Thomas Rabaix" <[EMAIL PROTECTED]> wrote:
>> http://trac.symfony-project.org/newticket
>>
>>
>>
>> On Mon, Oct 20, 2008 at 11:02 AM, wallaby  
>> <[EMAIL PROTECTED]> wrote:
>>
>>> Yes, but:
>>> code: 000000
>>> is exactly what Symfony dumps.
>>
>>> It doesn't dump it this way:
>>> code: "000000"
>>
>>> I should manually fix the values each time I do dump/load then.
>>
>>> On Oct 17, 6:51 pm, "Thomas Rabaix" <[EMAIL PROTECTED]> wrote:
>>>> "000000"
>>
>>>> On Fri, Oct 17, 2008 at 5:49 PM, wallaby  
>>>> <[EMAIL PROTECTED]> wrote:
>>
>>>>> Dear All,
>>
>>>>> I've expierienced unpleasant problem.
>>>>> I have a varchar(6) field in my database which is supposed to  
>>>>> store
>>>>> color codes
>>
>>>>> Fragment from schema.yml:
>>>>> code: {type: varchar(6), required: true}
>>
>>>>> In fixtures I have, for example:
>>>>> CsfColor_1:
>>>>>    code: 000000
>>>>>    xorder: 10
>>>>>    name: Black
>>>>>  CsfColor_2:
>>>>>    code: 000080
>>>>>    xorder: 50
>>>>>    name: Navy
>>
>>>>> Finally in the database I get:
>>>>> code = 0 and code = 80
>>
>>>>> With values like 00ff00 it doesn't happen as they strictly  
>>>>> appear to
>>>>> be string values, however I suppose symfony thinks that 000000 and
>>>>> 000080 are integers despite everything and cuts the leading  
>>>>> zeros. How
>>>>> do I fix this?
>>>>> The Symfony version is 1.0
>>
>>>>> Thank you in advance!
>>
>>>> --
>>>> Thomas Rabaix
>>>> Internet Consultant
>>
>> --
>> Thomas Rabaix
>> Internet Consultant
> >


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"symfony developers" 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-devs?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to