Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- CODE:
- $symbols_entity = new models\common\Symbols();
- $symbols_entity->setSymbol($symbol);
- $this->ci->em->persist($symbols_entity);
- $this->ci->em->flush();
- ERROR:
- PDOException [ HY093 ]: SQLSTATE[HY093]: Invalid parameter number: number of bound variables does not match number of tokens
- APPPATH/libraries/Doctrine/DBAL/Statement.php [ 131 ]
- 126 $hasLogger = $this->_conn->getConfiguration()->getSQLLogger();
- 127 if ($hasLogger) {
- 128 $this->_conn->getConfiguration()->getSQLLogger()->startQuery($this->_sql, $this->_params);
- 129 }
- 130
- 131 $stmt = $this->_stmt->execute($params);
- 132
- 133 if ($hasLogger) {
- 134 $this->_conn->getConfiguration()->getSQLLogger()->stopQuery();
- 135 }
- 136 $this->_params = array();
- APPPATH/libraries/Doctrine/DBAL/Statement.php [ 131 ] » PDOStatement->execute(arguments)
- bound_input_params
- 126 $hasLogger = $this->_conn->getConfiguration()->getSQLLogger();
- 127 if ($hasLogger) {
- 128 $this->_conn->getConfiguration()->getSQLLogger()->startQuery($this->_sql, $this->_params);
- 129 }
- 130
- 131 $stmt = $this->_stmt->execute($params);
- 132
- 133 if ($hasLogger) {
- 134 $this->_conn->getConfiguration()->getSQLLogger()->stopQuery();
- 135 }
- 136 $this->_params = array();
- APPPATH/libraries/Doctrine/ORM/Persisters/BasicEntityPersister.php [ 226 ] » Doctrine\DBAL\Statement->execute()
- 221 foreach ($insertData[$tableName] as $column => $value) {
- 222 $stmt->bindValue($paramIndex++, $value, $this->_columnTypes[$column]);
- 223 }
- 224 }
- 225
- 226 $stmt->execute();
- 227
- 228 if ($isPostInsertId) {
- 229 $id = $idGen->generate($this->_em, $entity);
- 230 $postInsertIds[$id] = $entity;
- 231 } else {
- APPPATH/libraries/Doctrine/ORM/UnitOfWork.php [ 698 ] » Doctrine\ORM\Persisters\BasicEntityPersister->executeInserts()
- 693 $entities[] = $entity;
- 694 }
- 695 }
- 696 }
- 697
- 698 $postInsertIds = $persister->executeInserts();
- 699
- 700 if ($postInsertIds) {
- 701 // Persister returned post-insert IDs
- 702 foreach ($postInsertIds as $id => $entity) {
- 703 $oid = spl_object_hash($entity);
- APPPATH/libraries/Doctrine/ORM/UnitOfWork.php [ 280 ] » Doctrine\ORM\UnitOfWork->executeInserts(arguments)
- class Doctrine\ORM\Mapping\ClassMetadata Object
- (
- [reflFields] => Array
- (
- [symbol_id] => ReflectionProperty Object
- (
- [name] => symbol_id
- [class] => models\common\Symbols
- )
- [exchange_id] => ReflectionProperty Object
- (
- [name] => exchange_id
- [class] => models\common\Symbols
- )
- [company] => ReflectionProperty Object
- (
- [name] => company
- [class] => models\common\Symbols
- )
- [symbol] => ReflectionProperty Object
- (
- [name] => symbol
- [class] => models\common\Symbols
- )
- [instrument_type] => ReflectionProperty Object
- (
- [name] => instrument_type
- [class] => models\common\Symbols
- )
- )
- [_prototype:Doctrine\ORM\Mapping\ClassMetadata:private] =>
- [name] => models\common\Symbols
- [namespace] => models\common
- [rootEntityName] => models\common\Symbols
- [customRepositoryClassName] =>
- [isMappedSuperclass] =>
- [parentClasses] => Array
- (
- )
- [subClasses] => Array
- (
- )
- [identifier] => Array
- (
- [0] => symbol_id
- [1] => exchange_id
- )
- [inheritanceType] => 1
- [generatorType] => 4
- [fieldMappings] => Array
- (
- [symbol_id] => Array
- (
- [fieldName] => symbol_id
- [type] => integer
- [length] => 10
- [precision] => 0
- [scale] => 0
- [nullable] =>
- [unique] =>
- [id] => 1
- [columnName] => symbol_id
- )
- [exchange_id] => Array
- (
- [fieldName] => exchange_id
- [type] => integer
- [length] => 10
- [precision] => 0
- [scale] => 0
- [nullable] =>
- [unique] =>
- [id] => 1
- [columnName] => exchange_id
- )
- [company] => Array
- (
- [fieldName] => company
- [type] => string
- [length] => 150
- [precision] => 0
- [scale] => 0
- [nullable] => 1
- [unique] =>
- [columnName] => company
- )
- [symbol] => Array
- (
- [fieldName] => symbol
- [type] => string
- [length] => 8
- [precision] => 0
- [scale] => 0
- [nullable] =>
- [unique] =>
- [columnName] => symbol
- )
- [instrument_type] => Array
- (
- [fieldName] => instrument_type
- [type] => string
- [length] => 8
- [precision] => 0
- [scale] => 0
- [nullable] => 1
- [unique] =>
- [columnName] => instrument_type
- )
- )
- [fieldNames] => Array
- (
- [symbol_id] => symbol_id
- [exchange_id] => exchange_id
- [company] => company
- [symbol] => symbol
- [instrument_type] => instrument_type
- )
- [columnNames] => Array
- (
- [symbol_id] => symbol_id
- [exchange_id] => exchange_id
- [company] => company
- [symbol] => symbol
- [instrument_type] => instrument_type
- )
- [discriminatorValue] =>
- [discriminatorMap] => Array
- (
- )
- [discriminatorColumn] =>
- [table] => Array
- (
- [name] => symbols
- )
- [lifecycleCallbacks] => Array
- (
- )
- [associationMappings] => Array
- (
- )
- [isIdentifierComposite] => 1
- [idGenerator] => Doctrine\ORM\Id\IdentityGenerator Object
- (
- [_seqName:Doctrine\ORM\Id\IdentityGenerator:private] =>
- )
- [sequenceGeneratorDefinition] =>
- [tableGeneratorDefinition] =>
- [changeTrackingPolicy] => 1
- [isVersioned] =>
- [versionField] =>
- [reflClass] => ReflectionClass Object
- (
- [name] => models\common\Symbols
- )
- )
- 275
- 276 $conn->beginTransaction();
- 277 try {
- 278 if ($this->entityInsertions) {
- 279 foreach ($commitOrder as $class) {
- 280 $this->executeInserts($class);
- 281 }
- 282 }
- 283
- 284 if ($this->entityUpdates) {
- 285 foreach ($commitOrder as $class) {
- APPPATH/libraries/Doctrine/ORM/EntityManager.php [ 324 ] » Doctrine\ORM\UnitOfWork->commit()
- 319 * makes use of optimistic locking fails.
- 320 */
- 321 public function flush()
- 322 {
- 323 $this->errorIfClosed();
- 324 $this->unitOfWork->commit();
- 325 }
- 326
- 327 /**
- 328 * Finds an Entity by its identifier.
- 329 *
- APPPATH/libraries/jungle_lib.php [ 638 ] » Doctrine\ORM\EntityManager->flush()
Add Comment
Please, Sign In to add comment