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
edf096eb
Commit
edf096eb
authored
May 14, 2010
by
David Abdemoulaie
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[DDC-588] EntityManager::refresh uses fieldName instead of columnName
parent
8174f67a
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
49 additions
and
1 deletion
+49
-1
UnitOfWork.php
lib/Doctrine/ORM/UnitOfWork.php
+1
-1
DDC588Test.php
tests/Doctrine/Tests/ORM/Functional/Ticket/DDC588Test.php
+48
-0
No files found.
lib/Doctrine/ORM/UnitOfWork.php
View file @
edf096eb
...
@@ -1480,7 +1480,7 @@ class UnitOfWork implements PropertyChangedListener
...
@@ -1480,7 +1480,7 @@ class UnitOfWork implements PropertyChangedListener
$class
=
$this
->
_em
->
getClassMetadata
(
get_class
(
$entity
));
$class
=
$this
->
_em
->
getClassMetadata
(
get_class
(
$entity
));
if
(
$this
->
getEntityState
(
$entity
)
==
self
::
STATE_MANAGED
)
{
if
(
$this
->
getEntityState
(
$entity
)
==
self
::
STATE_MANAGED
)
{
$this
->
getEntityPersister
(
$class
->
name
)
->
refresh
(
$this
->
getEntityPersister
(
$class
->
name
)
->
refresh
(
array_combine
(
$class
->
getIdentifier
Column
Names
(),
$this
->
_entityIdentifiers
[
$oid
]),
array_combine
(
$class
->
getIdentifier
Field
Names
(),
$this
->
_entityIdentifiers
[
$oid
]),
$entity
$entity
);
);
}
else
{
}
else
{
...
...
tests/Doctrine/Tests/ORM/Functional/Ticket/DDC588Test.php
0 → 100644
View file @
edf096eb
<?php
namespace
Doctrine\Tests\ORM\Functional\Ticket
;
require_once
__DIR__
.
'/../../../TestInit.php'
;
class
DDC588Test
extends
\Doctrine\Tests\OrmFunctionalTestCase
{
protected
function
setUp
()
{
parent
::
setUp
();
$this
->
_schemaTool
->
createSchema
(
array
(
$this
->
_em
->
getClassMetadata
(
__NAMESPACE__
.
'\DDC588Site'
),
));
}
public
function
testIssue
()
{
$site
=
new
DDC588Site
(
'Foo'
);
$this
->
_em
->
persist
(
$site
);
$this
->
_em
->
flush
();
// Following should not result in exception
$this
->
_em
->
refresh
(
$site
);
}
}
/**
* @Entity
*/
class
DDC588Site
{
/**
* @Id
* @Column(type="integer", name="site_id")
* @GeneratedValue
*/
public
$id
;
/**
* @Column(type="string", length=45)
*/
protected
$name
=
null
;
public
function
__construct
(
$name
=
''
)
{
$this
->
name
=
$name
;
}
}
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