What steps will reproduce the problem?
1.create a table with a pk
2.generate model
3.try to change the pk value with updateToDatabase(PDO $db)
What is the expected output? What do you see instead?
a modified row with the new pk value
What version of the product are you using? On what operating system?
1.2.6.3
Windows 7
NetBeans 6.8
Please provide any additional information below.
I've found the error in this code:
public function updateToDatabase(PDO $db) {
$stmt=self::prepareStatement($db,self::SQL_UPDATE);
$this->bindValues($stmt);
$stmt->bindValue(4,$this->getName());
$affected=$stmt->execute();
In case the pk value has changed, should use $this->OldInstance->getName(),
since $this->getName() contains the new value.
Original issue reported on code.google.com by lurr....@gmail.com on 19 Apr 2010 at 1:15
Original issue reported on code.google.com by
lurr....@gmail.com
on 19 Apr 2010 at 1:15