in my schema I set the size:
size: { type: bigint, required: true }
My generated 'base' model gives me:
public function setSize($v)
{
if ($v !== null) {
$v = (string) $v;
}
if ($this->size !== $v) {
$this->size = $v;
$this->modifiedColumns[] = TorrentPeer::SIZE;
}
return $this;
} // setSize()
Why does it case it to a string and not an integer?
I now receive the error:
"7818435653" is not an integer.
I tried changing the (string) to (int), but it did not work, I receive the same error. I'm confused why Propel made th开发者_开发百科is value string when I specified bigint. Any help?
propel stores bigint as a string as PHP's integer type is too small: http://www.propelorm.org/wiki/Documentation/1.5/Schema#NumericTypes
精彩评论