Adding a translatable field results on incomplete query result.

2008-10-09 Thread ygneo

Hi everybody.

I'm using the translate behavior in cake 1.2 like this, in a model
called "Regalo":

var $actsAs=array("Translate"=>array("titulo", "entradilla",
"descripcion"));

But I need a new field, so I've added:

var $actsAs=array("Translate"=>array("titulo", "entradilla",
"observaciones", "descripcion"));

The problem is that there was some rows in the table regalos, so they
have "titulo", "entradilla" and "descripcion" in the table i18n. But
there was not row for "observaciones" field. And now, when I add
"observaciones", the query generated by $this->set('regalos', $this-
>paginate("Regalo")); doesn't return all the rows, only the ones that
has a row for the field "observaciones" in i18n table.

I've decide to add manually empty rows for the row "observaciones" in
i18n table, but I'm sure there's a better solution, cause it's very
possible that I'd necessary to add new translatable fields.

Any idea?

Thanks!


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: Incomplete query result

2007-12-13 Thread wetmonkey

Nevermind I just found the solution from the PHP manual page...

http://us2.php.net/manual/en/function.mssql-query.php#69695

It wasn't a cake issue but rather a PHP + Windows issue.


On Dec 13, 3:02 pm, wetmonkey <[EMAIL PROTECTED]> wrote:
> I am running CakePHP 1.1.18.x on Windows 2003 Server, IIS, and MS SQL
> 2000.
>
> I'm querying a table with a column defined as varchar(2000) and the
> query result only returns 256 chars for that column. I tried the page
> on a Linux, Apache, and MS SQL environment and I get the proper
> result.
>
> Anyone know what could be causing this issue on the Win2K3
> environment?
>
> Thanks in advanced for any help.

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Incomplete query result

2007-12-13 Thread wetmonkey

I am running CakePHP 1.1.18.x on Windows 2003 Server, IIS, and MS SQL
2000.

I'm querying a table with a column defined as varchar(2000) and the
query result only returns 256 chars for that column. I tried the page
on a Linux, Apache, and MS SQL environment and I get the proper
result.

Anyone know what could be causing this issue on the Win2K3
environment?

Thanks in advanced for any help.

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---