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