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

int is returned as string #4

Closed
zifnab87 opened this issue Feb 25, 2015 · 1 comment
Closed

int is returned as string #4

zifnab87 opened this issue Feb 25, 2015 · 1 comment

Comments

@zifnab87
Copy link

dev-master:today
Hi, I am inserting an int and it is returned as a string. Here is my schema setup (it is integer obviously and saved): http://i.imgur.com/vc93Yq6.png

$data = ["IsOfTypeCount" => 10];
var_dump($data);
$transaction = $db->getTransactionStatement();
$transaction = $transaction->begin();
$record =  (new Record())
            ->setOData( $data )
            ->setOClass( "Entity" )
            ->setRid( new ID() );

$createCommand = $db->recordCreate($record);
$transaction->attach( $createCommand );
$transaction->commit();
$record = $db->query("select from Entity where @rid ='".$record->getRid()."'")[0];
$dataNew = $record->getOData();
 var_dump($dataNew);
//results:
array(1) {
  ["IsOfTypeCount"]=>
  int(10)
}
array(1) {
  ["IsOfTypeCount"]=>
  string(2) "10"
}

Thanks
Michail

@Ostico
Copy link
Collaborator

Ostico commented Feb 25, 2015

Moved on Ostico#14

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

No branches or pull requests

2 participants