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
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post will appear after it is approved by moderators
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
pablofmorales@gmail.com  
View profile  
 More options Sep 26 2011, 6:06 pm
From: "pablofmora...@gmail.com" <pablofmora...@gmail.com>
Date: Mon, 26 Sep 2011 19:06:46 -0300
Local: Mon, Sep 26 2011 6:06 pm
Subject: Re: [symfony-devs] I can't generate Foreign Keys

Sorry I could fixed :)
El 26/09/2011 19:03, "Pablo Morales" <pablofmora...@gmail.com> escribió:

> I have this entities

> namespace Model;
> /**
> * @Entity
> * @Table (name="usr_users")
> * @Entity(repositoryClass="Repository\UsersRepository")
> */
> class Users
> {
> /**
> * @Id
> * @Column(type="integer")
> * @GeneratedValue(strategy="AUTO")
> */
> protected $id;

> /**
> * @Column(type="string", length=150, nullable=false)
> */
> protected $username;

> /**
> * @Column(type="string", length=150, nullable=false)
> */
> protected $email;

> /**
> * @Column(type="string", nullable=false)
> */
> protected $password;

> /**
> * @Column(type="datetime", nullable=false)
> */
> protected $created_at;

> /**
> * @Column(type="datetime", nullable=false)
> */
> protected $update_at;

> /**
> * @Column(type="string", length=1, nullable=false)
> */
> protected $status;

> /**
> * @OneToMany(targetEntity="Contacts", mappedBy="user_id")
> */
> private $contactUsers;

> /*.....*/

> <?php
> namespace Model;
> /**
> * @Entity(repositoryClass="Repository\ContactsRepository")
> * @Table (name="usr_contacts")
> */
> class Contacts
> {

> /**
> * @Id @Column(type="integer")
> * @GeneratedValue(strategy="AUTO")
> */
> protected $id;

> /**
> * @ManyToOne(targetEntity="Users", inversedBy="contactsUsers")
> * @JoinColumn(name="user_id", referencedColumnName="id")
> * @Column(type="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=en


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.