Hello, 

I am a debutante in doctrine and Symfony2. 
I have a Postgres database with multiple schemas and I want to generate 
entities from the database. I followed the tutorial 
: http://symfony.com/fr/doc/current/cookbook/doctrine/reverse_engineering.html

But I have a problem that PHP does not accept class in the form 
"schema.table". 

Is it possible to generate entities from a database multi schemas 
with doctrine?

Thanks

Le mercredi 5 octobre 2011 19:18:54 UTC+2, Guilherme Blanco a écrit :
>
> As a solution, you can define the @Table(name="gps.points")
> It will works as you wish
> Em 05/10/2011 13:10, "Greg Militello" <[email protected] <javascript:>> 
> escreveu:
> > Well drat. I guess ORM is a no go for me then...
> > 
> > On Oct 5, 2011, at 11:41 AM, [email protected] <javascript:> wrote:
> > 
> >> Schema support is not yet fully implemented. I doubt you'll be able to
> >> use it. =\
> >> 
> >> We plan to add support for it in 2.2
> >> 
> >> On Wed, Oct 5, 2011 at 12:38 PM, Greg Militello <[email protected] 
> <javascript:>> wrote:
> >>> Is doctrine2 ORM capable of dealing with PostgreSQL SCHEMAs?
> >>> There is a use case I have for segregating my data in PostgreSQL based 
> on
> >>> SCHEMAs, but I am not sure if I can map the tables properly. For 
> example I
> >>> would love to make a class like:
> >>> <?php
> >>> /**
> >>> * @Entity
> >>> * @Table(name="points", schema="gps")
> >>> */
> >>> class GpsPoints
> >>> {
> >>> //...
> >>> }
> >>> 
> >>> 
> >>> Now ideally if this code was using PostgreSQL the SQL generated would 
> look
> >>> like:
> >>> CREATE SCHEMA gps;
> >>> CREATE TABLE gps.points ( ... );
> >>> 
> >>> I am not sure how this would map to a DB that does not support 
> schema's, but
> >>> the use case I am dealing with is fairly common when on PostgreSQL 
> (Schema
> >>> separation allows for a schema to be mapped to different physical drive
> >>> points, as well as very nice features when dealing with replication 
> and some
> >>> other benefits).
> >>> I appologize if this is supported, and I do not see it in the doc. But 
> if
> >>> it does can someone point me in that general direction?
> >>> 
> >>> --
> >>> You received this message because you are subscribed to the Google 
> Groups
> >>> "doctrine-user" group.
> >>> To post to this group, send email to [email protected] 
> <javascript:>.
> >>> To unsubscribe from this group, send email to
> >>> [email protected] <javascript:>.
> >>> For more options, visit this group at
> >>> http://groups.google.com/group/doctrine-user?hl=en.
> >>> 
> >> 
> >> 
> >> 
> >> -- 
> >> Guilherme Blanco
> >> Mobile: +55 (11) 8118-4422
> >> MSN: [email protected] <javascript:>
> >> São Paulo - SP/Brazil
> >> 
> >> -- 
> >> You received this message because you are subscribed to the Google 
> Groups "doctrine-user" group.
> >> To post to this group, send email to [email protected] 
> <javascript:>.
> >> To unsubscribe from this group, send email to 
> [email protected] <javascript:>.
> >> For more options, visit this group at 
> http://groups.google.com/group/doctrine-user?hl=en.
> >> 
> > 
> > -- 
> > You received this message because you are subscribed to the Google 
> Groups "doctrine-user" group.
> > To post to this group, send email to [email protected] 
> <javascript:>.
> > To unsubscribe from this group, send email to 
> [email protected] <javascript:>.
> > For more options, visit this group at 
> http://groups.google.com/group/doctrine-user?hl=en.
> > 
>

-- 
You received this message because you are subscribed to the Google Groups 
"doctrine-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/doctrine-user.
For more options, visit https://groups.google.com/d/optout.

Reply via email to