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
6d29c834
Commit
6d29c834
authored
Jun 27, 2007
by
zYne
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
deprecated countRelated()
parent
94fb249e
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
27 deletions
+3
-27
Record.php
lib/Doctrine/Record.php
+3
-27
No files found.
lib/Doctrine/Record.php
View file @
6d29c834
...
...
@@ -1350,6 +1350,7 @@ abstract class Doctrine_Record extends Doctrine_Access implements Countable, Ite
public
function
hasOne
()
{
$this
->
_table
->
bind
(
func_get_args
(),
Doctrine_Relation
::
ONE_AGGREGATE
);
return
$this
;
}
/**
...
...
@@ -1364,6 +1365,7 @@ abstract class Doctrine_Record extends Doctrine_Access implements Countable, Ite
public
function
hasMany
()
{
$this
->
_table
->
bind
(
func_get_args
(),
Doctrine_Relation
::
MANY_AGGREGATE
);
return
$this
;
}
/**
...
...
@@ -1382,35 +1384,9 @@ abstract class Doctrine_Record extends Doctrine_Access implements Countable, Ite
}
public
function
hasColumns
(
array
$definitions
)
{
foreach
(
$definitions
as
$name
=>
$options
)
{
foreach
(
$definitions
as
$name
=>
$options
)
{
$this
->
hasColumn
(
$name
,
$options
[
'type'
],
$options
[
'length'
],
$options
);
}
}
/**
* countRelated
*
* @param string $name the name of the related component
* @return integer
*/
public
function
countRelated
(
$name
)
{
$rel
=
$this
->
_table
->
getRelation
(
$name
);
$componentName
=
$rel
->
getTable
()
->
getComponentName
();
$query
=
new
Doctrine_Query
();
/**
$query->select('COUNT(p.id)')
->from($componentName)
->where($componentName. '.' . $rel->getAlias()
. '.' . $this->getTable()->getIdentifier(). ' = ?');
*/
//$array = $query->execute(array($this->getIncremented()));
return
0
;
//return $array[0]['COUNT(1)'];
}
/**
* merge
...
...
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