Skip to content
Browse files

fixed more bugs and typos

  • Loading branch information...
1 parent 2f4b818 commit 0af0fc8ed7d1b0654c46de0362b38ca9e3f598d6 @mpscholten committed Oct 9, 2013
View
2 src/Propel/Generator/Builder/Om/templates/Object/_buildPkeyCriteria.php.twig
@@ -12,7 +12,7 @@ public function buildPkeyCriteria()
{
$criteria = new Criteria({{ builder.tableMapClassName }}::DATABASE_NAME);
{% for column in builder.table.primaryKey %}
- $criteria->add({{ builder.columnConstant(column) }}, $this->{{ column.name|lower }});";
+ $criteria->add({{ builder.columnConstant(column) }}, $this->{{ column.name|lower }});
{% endfor %}
return $criteria;
View
2 src/Propel/Generator/Builder/Om/templates/Object/_copy.php.twig
@@ -68,7 +68,7 @@ public function copyInto($copyObj, $deepCopy = false, $makeNew = true)
$copyObj->setNew(true);
{% for column in builder.table.columns %}
{% if column.autoIncrement %}
- $copyObj->set{{ column.phpName }}({{ builder.defaultValueString }}); // this is a auto-increment column, so set to default value
+ $copyObj->set{{ column.phpName }}({{ builder.defaultValueString(column) }}); // this is a auto-increment column, so set to default value
{% endif %}
{% endfor %}
}
View
3 src/Propel/Generator/Builder/Om/templates/Object/_genericMutators/_fromArray.php.twig
@@ -15,9 +15,10 @@
* @param string $keyType The type of keys the array uses.
* @return void
*/
-public function fromArray($arr, $keyType = TableMap::$defaultKeyType)
+public function fromArray($arr, $keyType = TableMap::{{ builder.defaultKeyType }})
{
$keys = {{ builder.tableMapClassName }}::getFieldNames($keyType);
{% for column in builder.table.columns %}
if (array_key_exists($keys[{{ loop.index0 }}], $arr)) $this->set{{ column.phpName }}($arr[$keys[{{ loop.index0 }}]]);
{% endfor %}
+}
View
2 src/Propel/Generator/Builder/Om/templates/Object/_primaryKey/_accessors.php.twig
@@ -18,7 +18,7 @@
public function getPrimaryKey()
{
$pks = array();
- {% for primaryKey in builder.table.primaryKeys %}
+ {% for primaryKey in primaryKeys %}
$pks[{{ loop.index0 }}] = $this->get{{ primaryKey.phpName }}();
{% endfor %}
View
4 src/Propel/Generator/Builder/Om/templates/Object/_primaryKey/_mutators.php.twig
@@ -20,8 +20,8 @@
*/
public function setPrimaryKey($keys)
{
- {% for primaryKey in builder.table.primaryKeys %}
- $this->set{{ primaryKey.phpName }}($keys[{{ loop.index0 }}]);";
+ {% for primaryKey in primaryKeys %}
+ $this->set{{ primaryKey.phpName }}($keys[{{ loop.index0 }}]);
{% endfor %}
}
{% else %}

0 comments on commit 0af0fc8

Please sign in to comment.
Something went wrong with that request. Please try again.