1
0
mirror of synced 2025-01-29 19:41:45 +03:00

added another schema example with onDelete: CASCADE

generalized a connection example to use user:pass instead of jwage:pass...
This commit is contained in:
gnat 2008-01-09 20:02:32 +00:00
parent c456e4c788
commit 64e1f6e44a

View File

@ -108,10 +108,40 @@ GroupUser:
primary: true
</code>
+++ One to One Aggregate
<code type="yaml">
---
User:
columns:
id:
type: integer(4)
primary: true
autoincrement: true
contact_id:
type: integer(4)
username:
type: string(255)
password:
type: string(255)
relations:
Contact:
foreignType: one
onDelete: CASCADE
Contact:
columns:
id:
type: integer(4)
primary: true
autoincrement: true
name:
type: string(255)
</code>
++ Connection Binding
<code type="php">
Doctrine::connection('mysql://jwage:pass@localhost/connection1', 'connection1');
Doctrine::connection('mysql://user:pass@localhost/connection1', 'connection1');
</code>
<code type="yaml">