jeudi 14 janvier 2016

invalid input syntax for integer when using HasOne in laravel 5.1

Sorry for my english first.

My problem is this.

I'm making a One to One relation in laravel 5.1 but when i run it I got this error:

SQLSTATE[22P02]: Invalid text representation: 7 ERROR: invalid input syntax for integer: "02.09" (SQL: select * from "category" where "category"."category_pos" in (02.09, 02.08, 02.06, 01.08, 02.11, 01.06, 02.02, 01.02, 2, 1) and "category"."deleted_at" is null)

Is there a way to convert local_key to string... e.g. 02.09 to become '02.09' ?

Thank you in advance.



via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire