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
76663a05
Commit
76663a05
authored
Mar 18, 2010
by
romanb
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[2.0][DDC-416] Fixed.
parent
91ac6fae
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
1 deletion
+11
-1
JoinedSubclassPersister.php
lib/Doctrine/ORM/Persisters/JoinedSubclassPersister.php
+5
-1
ClassTableInheritanceTest.php
...ctrine/Tests/ORM/Functional/ClassTableInheritanceTest.php
+6
-0
No files found.
lib/Doctrine/ORM/Persisters/JoinedSubclassPersister.php
View file @
76663a05
...
...
@@ -398,7 +398,11 @@ class JoinedSubclassPersister extends StandardEntityPersister
$conditionSql
=
''
;
foreach
(
$criteria
as
$field
=>
$value
)
{
if
(
$conditionSql
!=
''
)
$conditionSql
.=
' AND '
;
if
(
isset
(
$this
->
_class
->
fieldMappings
[
$field
][
'inherited'
]))
{
$conditionSql
.=
$this
->
_getSQLTableAlias
(
$this
->
_em
->
getClassMetadata
(
$this
->
_class
->
fieldMappings
[
$field
][
'inherited'
]))
.
'.'
;
}
else
{
$conditionSql
.=
$baseTableAlias
.
'.'
;
}
if
(
isset
(
$this
->
_class
->
columnNames
[
$field
]))
{
$conditionSql
.=
$this
->
_class
->
getQuotedColumnName
(
$field
,
$this
->
_platform
);
}
else
if
(
$assoc
!==
null
)
{
...
...
tests/Doctrine/Tests/ORM/Functional/ClassTableInheritanceTest.php
View file @
76663a05
...
...
@@ -71,6 +71,12 @@ class ClassTableInheritanceTest extends \Doctrine\Tests\OrmFunctionalTestCase
$this
->
_em
->
clear
();
$guilherme
=
$this
->
_em
->
getRepository
(
get_class
(
$employee
))
->
findOneBy
(
array
(
'name'
=>
'Guilherme Blanco'
));
$this
->
assertTrue
(
$guilherme
instanceof
CompanyEmployee
);
$this
->
assertEquals
(
'Guilherme Blanco'
,
$guilherme
->
getName
());
$this
->
_em
->
clear
();
$query
=
$this
->
_em
->
createQuery
(
"update Doctrine\Tests\Models\Company\CompanyEmployee p set p.name = ?1, p.department = ?2 where p.name='Guilherme Blanco' and p.salary = ?3"
);
$query
->
setParameter
(
1
,
'NewName'
);
$query
->
setParameter
(
2
,
'NewDepartment'
);
...
...
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