php


Doctrine2 ORM - Error using getResult


I am using DoctrineORM and its querybuilder to update some data in my mySQL database. Look at my code below, I cannot spot the mistake.
public function update($id, Request $request){
$em = new em();
// fetch the document to be updated
$updatedDocument = $em->getEm()->find('backend\resources\entities\Document', $id);
$document = $request->request->all();
$translator = new Translator('de_de');
$validator = new Validation\Validator($translator, $document, $this->rules);
if($validator->passes()){
$updatedDocument->setTitle($document['title']);
$updatedDocument->setWorkflow($document['workflow']);
$updatedDocument->setDocClass($document['docClass']);
$em->getEm()->persist($document);
$em->getEm()->flush();
$response = json_encode($document);
return new Response($response, 200, array('Content-Type' => 'json'));
}
$response = json_encode(array('Error' => 'Could not be updated.'));
return new Response($response, 200, array('Content-Type' => 'json'));
}
Now when I try to call this function I get this message:
Warning: require(/tmp/__CG__backendresourcesentitiesUser.php): failed to open stream: No such file or directory in /www/htdocs/w00ebb23/fokus/vendor/doctrine/common/lib/Doctrine/Common/Proxy/AbstractProxyFactory.php on line 207
Fatal error: require(): Failed opening required '/tmp/__CG__backendresourcesentitiesUser.php' (include_path='.:/usr/share/php:..') in /www/htdocs/w00ebb23/fokus/vendor/doctrine/common/lib/Doctrine/Common/Proxy/AbstractProxyFactory.php on line 207
I have to add that function with nearly the same content but for different entities work well. But this one doesn't.
A simple find by Id works fine when I use getArrayResult instead of getResult or getSingleResult. Any ideas what could be the error?

Related Links

Modify PHP. Customize how PHP calls a function
JQGrid PHP subgrid level 2 is not rendering
Extract a string that is the difference between two other strings in PHP
How to use print_r of PHP in browser
Creating array from keys and values of another array
Laravel http request: Cannot run multiple request
How to separate date and time in php?
Advice on list/look up table/hash table?
Inserting data into 2 mysql table is not working
Select with oracle in php doesnt echo value
PHP Preg_split selecting the internal contents of an HTML tag
invalid arguments passed to implode
Swift upload file to PHP server
Wordpress 2nd laugauge not working
optimized two query as one and seprates results
Flatten array an array PHP [duplicate]

Categories

HOME
ionic2
artificial-intelligence
knockout.js
plesk
whmcs
biztalk
vsts-build
web2py
liferay-7
turbojpeg
visualforce
ipv6
stored-procedures
angular-meteor
clish
buffer
xbap
stimulsoft
synthesis
closures
rpmbuild
tfsbuild
rxjs5
dragula
unrar
xdebug
python-imageio
laravel-4.2
sparkle
javax.persistence
winsock
fotorama
osx-lion
gsp
express-session
assertions
ftp-server
eclipse-gmf
windows-store
ejml
spooler
viewmodel
windows-media-player
ssi
rm
sigsegv
spring.net
subforms
webvtt
htmlspecialchars
dblink
apache-modules
front-camera
perl-data-structures
ternary-operator
deviare
libharu
dcount
noclassdeffounderror
node-glob
swiffy
teamviewer
vimperator
myfaces
lovefield
perceptron
cfwheels
gitlab-omnibus
bootstrap-wysiwyg
com0com
nsmutabledata
google-hangouts
angular-ui-select
lumia-imaging-sdk
rpg
network-printers
jms-serializer
spring-social-linkedin
facebook-game-groups
ctp
discovery
flv
aero
background-thread
reentrancy
opends
directshow.net
grails-validation
principles
aspbutton
inversion

Resources

Encrypt Message



code
soft
python
ios
c
html
jquery
cloud
mobile