You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi, I'm relatively new to Propel. I setup my DB with propel init, and did propel build, which generated the models. However, when I tried to use the ->save() function, my IDE reports that the method does not exist. Does anyone know why this is so?
I'm using PHPStorm 2017.1.4
Also, my IDE also reports that another definition with the same name exists in the file, and commenting out the use myNameSpace\SubNameSpace\ModelName seemed to help.
The text was updated successfully, but these errors were encountered:
In the data mapper pattern, the persistance logic is not contained into the entity, so you should use the session objectd to do it:
// create the $configuration manually$configuration = newConfiguration(‘./path/to/propel.yml’);
$session = $configuration->createSession();
$car1 = newCar(‘FordMustang’);
$session->persist($car);
$car2 = newCar(‘FerrariTestarossa’);
$session->persist($car);
$session->commit(); //Save the objects to the database, following the unit-of-work pattern
Hi, I'm relatively new to Propel. I setup my DB with
propel init
, and didpropel build
, which generated the models. However, when I tried to use the->save()
function, my IDE reports that the method does not exist. Does anyone know why this is so?I'm using PHPStorm 2017.1.4
Also, my IDE also reports that another definition with the same name exists in the file, and commenting out the
use myNameSpace\SubNameSpace\ModelName
seemed to help.The text was updated successfully, but these errors were encountered: