foreignAlias is used to set the name your relation will have on the
related object.
for example:
User:
columns:
id:
type: integer(4)
primary: true
name:
type: string(10)
Phone:
columns:
id:
type: integer(4)
primary: true
user_id:
type: integer(4)
phone:
type: string(20)
relations:
User:
foreignAlias: Phones
there, foreignAlias y setting the name for your relation between User
and Phones. To get the phones of a user you will use:
$user->Phones
if you use: foreignAlias: Phonenumbers, then it will be:
$user->Phonenumbers
hope to resolve your question.
Here is the manual page for relations:
http://doctrine.pengus.net/index.php/documentation/manual?chapter=relations
and as a suggestion: its easier to get answers for doctrine on the
doctrine-user google group ;-)
http://groups.google.com/group/doctrine-user
have a nice weekend
- JoaquĆn
On Nov 30, 4:17 am, Greg Freeman <[EMAIL PROTECTED]> wrote:
> Hey,
>
> I am just starting to use doctrine. Can someone please explain the
> foreignAlias in the schema?
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"symfony developers" 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-devs?hl=en
-~----------~----~----~----~------~----~------~--~---