Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
Message from discussion I can't generate Foreign Keys

Received: by 10.68.8.229 with SMTP id u5mr25097861pba.0.1317074811043;
        Mon, 26 Sep 2011 15:06:51 -0700 (PDT)
X-BeenThere: symfony-devs@googlegroups.com
Received: by 10.68.33.194 with SMTP id t2ls20125342pbi.0.gmail; Mon, 26 Sep
 2011 15:06:46 -0700 (PDT)
Received: by 10.68.8.135 with SMTP id r7mr25022220pba.8.1317074806857;
        Mon, 26 Sep 2011 15:06:46 -0700 (PDT)
Received: by 10.68.8.135 with SMTP id r7mr25022216pba.8.1317074806844;
        Mon, 26 Sep 2011 15:06:46 -0700 (PDT)
Return-Path: <pablofmora...@gmail.com>
Received: from mail-pz0-f41.google.com (mail-pz0-f41.google.com [209.85.210.41])
        by gmr-mx.google.com with ESMTPS id j4si27937920pbi.2.2011.09.26.15.06.46
        (version=TLSv1/SSLv3 cipher=OTHER);
        Mon, 26 Sep 2011 15:06:46 -0700 (PDT)
Received-SPF: pass (google.com: domain of pablofmora...@gmail.com designates 209.85.210.41 as permitted sender) client-ip=209.85.210.41;
Authentication-Results: gmr-mx.google.com; spf=pass (google.com: domain of pablofmora...@gmail.com designates 209.85.210.41 as permitted sender) smtp.mail=pablofmora...@gmail.com; dkim=pass (test mode) header...@gmail.com
Received: by mail-pz0-f41.google.com with SMTP id 5so16495597pzk.0
        for <symfony-devs@googlegroups.com>; Mon, 26 Sep 2011 15:06:46 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=gmail.com; s=gamma;
        h=mime-version:in-reply-to:references:date:message-id:subject:from:to
         :content-type;
        bh=DMOb0TQpExRlAkxa+2xyp9D+h+61h7QumVnX86rPUf0=;
        b=GsZW6RuMcCakmmIaggBW+Tl8YNPC9JkgGzfcFlJPgqKyr879WHyWRVwOgejElU6A4L
         UFSrSSt8/Ca8bt/V0auv3yGb5STWpLqs6gP2EtGLJQe7KgOCFf9m3AB0RXmKcVMJ2xuW
         l6pqNFb5W5Kl6lCAsaOUBH7T0ZF9n7JGCqo8s=
MIME-Version: 1.0
Received: by 10.68.14.68 with SMTP id n4mr32053224pbc.38.1317074806504; Mon,
 26 Sep 2011 15:06:46 -0700 (PDT)
Received: by 10.143.167.15 with HTTP; Mon, 26 Sep 2011 15:06:46 -0700 (PDT)
Received: by 10.143.167.15 with HTTP; Mon, 26 Sep 2011 15:06:46 -0700 (PDT)
In-Reply-To: <72ffffcb-2db1-49b9-a6ad-d6b874283...@x19g2000vbl.googlegroups.com>
References: <72ffffcb-2db1-49b9-a6ad-d6b874283...@x19g2000vbl.googlegroups.com>
Date: Mon, 26 Sep 2011 19:06:46 -0300
Message-ID: <CABUb+NmHoxSd-pBZ++5vjZricMB8tPMK8T6uAB6aOzdM4E5...@mail.gmail.com>
Subject: Re: [symfony-devs] I can't generate Foreign Keys
From: "pablofmora...@gmail.com" <pablofmora...@gmail.com>
To: Symfony developers <symfony-devs@googlegroups.com>
Content-Type: multipart/alternative; boundary=bcaec5215b9ffbfbba04addf5fe9

--bcaec5215b9ffbfbba04addf5fe9
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

Sorry I could fixed :)
El 26/09/2011 19:03, "Pablo Morales" <pablofmora...@gmail.com> escribi=C3=
=B3:
> I have this entities
>
>
> namespace Model;
> /**
> * @Entity
> * @Table (name=3D"usr_users")
> * @Entity(repositoryClass=3D"Repository\UsersRepository")
> */
> class Users
> {
> /**
> * @Id
> * @Column(type=3D"integer")
> * @GeneratedValue(strategy=3D"AUTO")
> */
> protected $id;
>
> /**
> * @Column(type=3D"string", length=3D150, nullable=3Dfalse)
> */
> protected $username;
>
> /**
> * @Column(type=3D"string", length=3D150, nullable=3Dfalse)
> */
> protected $email;
>
> /**
> * @Column(type=3D"string", nullable=3Dfalse)
> */
> protected $password;
>
> /**
> * @Column(type=3D"datetime", nullable=3Dfalse)
> */
> protected $created_at;
>
> /**
> * @Column(type=3D"datetime", nullable=3Dfalse)
> */
> protected $update_at;
>
> /**
> * @Column(type=3D"string", length=3D1, nullable=3Dfalse)
> */
> protected $status;
>
> /**
> * @OneToMany(targetEntity=3D"Contacts", mappedBy=3D"user_id")
> */
> private $contactUsers;
>
>
> /*.....*/
>
> <?php
> namespace Model;
> /**
> * @Entity(repositoryClass=3D"Repository\ContactsRepository")
> * @Table (name=3D"usr_contacts")
> */
> class Contacts
> {
>
> /**
> * @Id @Column(type=3D"integer")
> * @GeneratedValue(strategy=3D"AUTO")
> */
> protected $id;
>
> /**
> * @ManyToOne(targetEntity=3D"Users", inversedBy=3D"contactsUsers")
> * @JoinColumn(name=3D"user_id", referencedColumnName=3D"id")
> * @Column(type=3D"integer")
> */
> protected $user_id;
>
>
>
>
>
> When I will to generate a dump, it create a table dump, but don't add
> the foreign key
>
> What is wrong?
>
> --
> If you want to report a vulnerability issue on symfony, please send it to
security at symfony-project.com
>
> You received this message because you are subscribed to the Google
> Groups "symfony developers" group.
> To post to this group, send email to symfony-devs@googlegroups.com
> To unsubscribe from this group, send email to
> symfony-devs+unsubscribe@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/symfony-devs?hl=3Den

--bcaec5215b9ffbfbba04addf5fe9
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

<p>Sorry I could fixed :)</p>
<div class=3D"gmail_quote">El 26/09/2011 19:03, &quot;Pablo Morales&quot; &=
lt;<a href=3D"mailto:pablofmora...@gmail.com">pablofmora...@gmail.com</a>&g=
t; escribi=C3=B3:<br type=3D"attribution">&gt; I have this entities<br>&gt;=
 <br>&gt; <br>
&gt; namespace Model;<br>&gt; /**<br>&gt;  * @Entity<br>&gt;  * @Table (nam=
e=3D&quot;usr_users&quot;)<br>&gt;  * @Entity(repositoryClass=3D&quot;Repos=
itory\UsersRepository&quot;)<br>&gt;  */<br>&gt; class Users<br>&gt; {<br>&=
gt;     /**<br>
&gt;      * @Id<br>&gt;      * @Column(type=3D&quot;integer&quot;)<br>&gt; =
     * @GeneratedValue(strategy=3D&quot;AUTO&quot;)<br>&gt;      */<br>&gt;=
     protected $id;<br>&gt; <br>&gt;     /**<br>&gt;      * @Column(type=3D=
&quot;string&quot;, length=3D150, nullable=3Dfalse)<br>
&gt;      */<br>&gt;     protected $username;<br>&gt; <br>&gt;     /**<br>&=
gt;      * @Column(type=3D&quot;string&quot;, length=3D150, nullable=3Dfals=
e)<br>&gt;      */<br>&gt;     protected $email;<br>&gt; <br>&gt;     /**<b=
r>
&gt;      * @Column(type=3D&quot;string&quot;, nullable=3Dfalse)<br>&gt;   =
   */<br>&gt;     protected $password;<br>&gt; <br>&gt;     /**<br>&gt;    =
  * @Column(type=3D&quot;datetime&quot;, nullable=3Dfalse)<br>&gt;      */<=
br>&gt;     protected $created_at;<br>
&gt; <br>&gt;     /**<br>&gt;      * @Column(type=3D&quot;datetime&quot;, n=
ullable=3Dfalse)<br>&gt;      */<br>&gt;     protected $update_at;<br>&gt; =
<br>&gt;     /**<br>&gt;      * @Column(type=3D&quot;string&quot;, length=
=3D1, nullable=3Dfalse)<br>
&gt;      */<br>&gt;     protected $status;<br>&gt; <br>&gt;     /**<br>&gt=
;      * @OneToMany(targetEntity=3D&quot;Contacts&quot;, mappedBy=3D&quot;u=
ser_id&quot;)<br>&gt;      */<br>&gt;     private $contactUsers;<br>&gt; <b=
r>
&gt; <br>&gt; /*.....*/<br>&gt; <br>&gt; &lt;?php<br>&gt; namespace Model;<=
br>&gt; /**<br>&gt;  * @Entity(repositoryClass=3D&quot;Repository\ContactsR=
epository&quot;)<br>&gt;  * @Table (name=3D&quot;usr_contacts&quot;)<br>&gt=
;  */<br>
&gt; class Contacts<br>&gt; {<br>&gt; <br>&gt;     /**<br>&gt;      * @Id @=
Column(type=3D&quot;integer&quot;)<br>&gt;      * @GeneratedValue(strategy=
=3D&quot;AUTO&quot;)<br>&gt;      */<br>&gt;     protected $id;<br>&gt; <br=
>
&gt;     /**<br>&gt;      * @ManyToOne(targetEntity=3D&quot;Users&quot;, in=
versedBy=3D&quot;contactsUsers&quot;)<br>&gt;      * @JoinColumn(name=3D&qu=
ot;user_id&quot;, referencedColumnName=3D&quot;id&quot;)<br>&gt;      * @Co=
lumn(type=3D&quot;integer&quot;)<br>
&gt;      */<br>&gt;     protected $user_id;<br>&gt; <br>&gt; <br>&gt; <br>=
&gt; <br>&gt; <br>&gt; When I will to generate a dump, it create a table du=
mp, but don&#39;t add<br>&gt; the foreign key<br>&gt; <br>&gt; What is wron=
g?<br>
&gt; <br>&gt; -- <br>&gt; If you want to report a vulnerability issue on sy=
mfony, please send it to security at <a href=3D"http://symfony-project.com"=
>symfony-project.com</a><br>&gt; <br>&gt; You received this message because=
 you are subscribed to the Google<br>
&gt; Groups &quot;symfony developers&quot; group.<br>&gt; To post to this g=
roup, send email to <a href=3D"mailto:symfony-devs@googlegroups.com">symfon=
y-devs@googlegroups.com</a><br>&gt; To unsubscribe from this group, send em=
ail to<br>
&gt; <a href=3D"mailto:symfony-devs%2Bunsubscribe@googlegroups.com">symfony=
-devs+unsubscribe@googlegroups.com</a><br>&gt; For more options, visit this=
 group at<br>&gt; <a href=3D"http://groups.google.com/group/symfony-devs?hl=
=3Den">http://groups.google.com/group/symfony-devs?hl=3Den</a><br>
</div>

--bcaec5215b9ffbfbba04addf5fe9--