Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
D
doctrine-dbal
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Tomáš Trávníček
doctrine-dbal
Commits
c64b774b
Commit
c64b774b
authored
Sep 03, 2007
by
meus
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
change old way of declaring definitions to new one
parent
a975c64d
Changes
6
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
9 additions
and
9 deletions
+9
-9
BoardWithPosition.php
models/BoardWithPosition.php
+1
-1
CategoryWithPosition.php
models/CategoryWithPosition.php
+1
-1
Forum_Board.php
models/Forum_Board.php
+2
-2
Forum_Entry.php
models/Forum_Entry.php
+2
-2
Forum_Thread.php
models/Forum_Thread.php
+2
-2
Cms_Cateogry.php
models/export/Cms_Cateogry.php
+1
-1
No files found.
models/BoardWithPosition.php
View file @
c64b774b
...
...
@@ -5,6 +5,6 @@ class BoardWithPosition extends Doctrine_Record {
$this
->
hasColumn
(
'category_id'
,
'integer'
);
}
public
function
setUp
()
{
$this
->
hasOne
(
'CategoryWithPosition as Category'
,
'BoardWithPosition.category_id'
);
$this
->
hasOne
(
'CategoryWithPosition as Category'
,
array
(
'local'
=>
'category_id'
,
'foreign'
=>
'id'
,
'onDelete'
=>
'CASCADE'
)
);
}
}
models/CategoryWithPosition.php
View file @
c64b774b
...
...
@@ -5,6 +5,6 @@ class CategoryWithPosition extends Doctrine_Record {
$this
->
hasColumn
(
'name'
,
'string'
,
255
);
}
public
function
setUp
()
{
$this
->
ownsMany
(
'BoardWithPosition as Boards'
,
'BoardWithPosition.category_id'
);
$this
->
hasMany
(
'BoardWithPosition as Boards'
,
array
(
'local'
=>
'id'
,
'foreign'
=>
'category_id'
));
}
}
models/Forum_Board.php
View file @
c64b774b
...
...
@@ -6,8 +6,8 @@ class Forum_Board extends Doctrine_Record {
$this
->
hasColumn
(
'description'
,
'string'
,
5000
);
}
public
function
setUp
()
{
$this
->
hasOne
(
'Forum_Category as Category'
,
'Forum_Board.category_id'
);
$this
->
ownsMany
(
'Forum_Thread as Threads'
,
'Forum_Thread.board_id'
);
$this
->
hasOne
(
'Forum_Category as Category'
,
array
(
'local'
=>
'category_id'
,
'foreign'
=>
'id'
)
);
$this
->
hasMany
(
'Forum_Thread as Threads'
,
array
(
'local'
=>
'id'
,
'foreign'
=>
'board_id'
)
);
}
}
models/Forum_Entry.php
View file @
c64b774b
...
...
@@ -9,8 +9,8 @@ class Forum_Entry extends Doctrine_Record {
$this
->
hasColumn
(
'date'
,
'integer'
,
10
);
}
public
function
setUp
()
{
$this
->
hasOne
(
'Forum_Entry as Parent'
,
'Forum_Entry.parent_entry_id'
);
$this
->
hasOne
(
'Forum_Thread as Thread'
,
'Forum_Entry.thread_id'
);
$this
->
hasOne
(
'Forum_Entry as Parent'
,
array
(
'local'
=>
'id'
,
'foreign'
=>
'parent_entry_id'
)
);
$this
->
hasOne
(
'Forum_Thread as Thread'
,
array
(
'local'
=>
'thread_id'
,
'foreign'
=>
'id'
,
'onDelete'
=>
'CASCADE'
)
);
}
}
models/Forum_Thread.php
View file @
c64b774b
...
...
@@ -6,8 +6,8 @@ class Forum_Thread extends Doctrine_Record {
$this
->
hasColumn
(
'closed'
,
'integer'
,
1
);
}
public
function
setUp
()
{
$this
->
hasOne
(
'Forum_Board as Board'
,
'Forum_Thread.board_id'
);
$this
->
ownsMany
(
'Forum_Entry as Entries'
,
'Forum_Entry.thread_id'
);
$this
->
hasOne
(
'Forum_Board as Board'
,
array
(
'local'
=>
'board_id'
,
'foreign'
=>
'id'
,
'onDelete'
=>
'CASCADE'
)
);
$this
->
hasMany
(
'Forum_Entry as Entries'
,
array
(
'local'
=>
'id'
,
'foreign'
=>
'thread_id'
)
);
}
}
models/export/Cms_Cateogry.php
View file @
c64b774b
...
...
@@ -4,7 +4,7 @@ class Cms_Category extends Doctrine_Record
public
function
setUp
()
{
$this
->
own
sMany
(
'Cms_CategoryLanguages as langs'
,
array
(
'local'
=>
'id'
,
'foreign'
=>
'category_id'
));
$this
->
ha
sMany
(
'Cms_CategoryLanguages as langs'
,
array
(
'local'
=>
'id'
,
'foreign'
=>
'category_id'
));
}
public
function
setTableDefinition
()
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment