|
Hi there.. I home someone sees this, this is the first post.
I'm hoping to use this module for a back end data loader onto a Symfony/Propel database. So far things are going great, I really like the module but I have run into a snag.
I am trying to convert some database data and I want to preserve the primary keys on the old database. As such, I need to set the 'id' field manually in a couple tables. Here is what doesn't seem to work:
$error = ORM::Error->new;
$star = PP::ppStars->new
(
prop => { id => $starId, first => $first, last => $last, teamId => $teamid,
alias=>$alias, lastFound=>$lastFound, duplicateError=>$duplicateError, alive=>$alive },
error => $error,
);
print "ERROR:".$error->text;
return $star;
Where starid is an integer value. I've tried this in two ways, with 'id' being an autoincrement and without. If I have it set as an autoincrement, then I cannot control the value of the id field at all. It autoincrements, and I end up with unsynchronized primary keys between my databases. If I do not have it set as autoinc, then $star object does not create and there is an error on a subsequent $star->id() call.
Could someone please tell me how to control the primary key? Thank you. |