Ok, i found the answer.
I skipped the chapter "Advanced" in the sfDoctrine manual, but there
was this behaviour explained. I did not expected this explanation in
the advanced chapter, cause i thought this is basic stuff.
For all, who run in the same issue:
Put a doctrine.yml with this content in your project/config folder:
----
# Turn off create tables for all environments, all connections
all:
attributes:
create_tables: on
----
(alter the env to your purposes)
- Frank
Am 11.05.2007 um 15:12 schrieb Frank Stelzer:
>
> Hi,
> i want to use the active record functionality of doctrine. That
> means, i
> have a model definition and want to create the according table on
> the fly.
>
> The manual
> (http://doctrine.pengus.net/doctrine/manual/documentation2.php?
> chapter=Getting+started+-+Starting+new+project)
> says that there is nothing more to do than extending
> Doctrine_Record and
> define the table definition in this child class. Ok, that is done. My
> according model classes are all there.
>
> But when i do:
> ---
> $foo = new Foo();
> $foo->set('col1','col1-123');
> $foo->save();
> ---
> I get the exception:
> ---
> SQLSTATE[42P01]: Undefined table: 7 ERROR: relation "foo" does not
> exist
> ---
>
> What have i do to automatically create the table in the database ???
>
> - Frank
>
>
>
> >
>
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"symfony users" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/symfony-users?hl=en
-~----------~----~----~----~------~----~------~--~---