Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Storing null value for integer throws error. #144

Open
AidasK opened this issue Sep 28, 2016 · 3 comments
Open

Storing null value for integer throws error. #144

AidasK opened this issue Sep 28, 2016 · 3 comments
Labels

Comments

@AidasK
Copy link
Contributor

AidasK commented Sep 28, 2016

I have upgraded gds library to v1 and now it throws an error then I am trying to assign null value for an integer. Is this a desired behaviour? Maybe this should be mentioned in the upgrade guide.

Client error: POST https://datastore.googleapis.com/v1/projects/xxx:commit resulted in a 400 Bad Request response: { "error": { "code": 400, "message": "The value "facebook_user_id" does not contain a value.", "status": (truncated..

@tomwalder
Copy link
Owner

I'll take a look.

Can you post your schema?

@AidasK
Copy link
Contributor Author

AidasK commented Oct 3, 2016

class AskQuestionSchema extends Schema
{
    function __construct()
    {
        parent::__construct('ask_question');
        $this
            ->addInteger('quiz_id')
            ->addBoolean('public', false)
            ->addInteger('facebook_user_id', false)
            ->addString('question', false)
            ->setEntityClass(AskQuestion::class);
    }
}

Now I am storing 0 instead of null in facebook_user_id and it works. But this is incompatibility with beta version.

@tomwalder
Copy link
Owner

This may have just been fixed by @tkasa as part of #164

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants