You should use Doctrine 2 Event listeners if you need access to the
EntityManager. Usage of the EntityManager within entities themselves is
STRONGLY discouraged, especially within Life-cycle Callbacks.
Marco Pivetta
http://twitter.com/Ocramius
http://marco-pivetta.com
On 22 June 2011 18:32
I'm still waiting for Zend Framework 2 MVC to start some new projects... The
draft is really interesting, and if it is implemented well as it is
defined... Well then Symfony 2 will be just part of my /lib for me :)
I'm just waiting a couple of weeks more to see what is going on :D
Marco Pivetta
Zend Framework 2's MVC still has to be implemented. You should really delay
the debate ~3 weeks from today before taking any decision...
Marco Pivetta
http://twitter.com/Ocramius
http://marco-pivetta.com
On 20 June 2011 17:00, Manu emmanuel.parf...@gmail.com wrote:
My development team created
Could you please check the encoding of your source files? Also check the
content-encoding headers sent by your web server :)
Marco Pivetta
http://twitter.com/Ocramius
http://marco-pivetta.com
2011/6/16 Lajos Cseppentő cseppen...@gmail.com
Hello everybody,
My problem is the next:
I am new
else
before :)
Marco Pivetta
http://twitter.com/Ocramius
http://marco-pivetta.com
On 16 June 2011 16:50, Tristan tristan.bessou...@gmail.com wrote:
Someone asked a similar question during the sfLive.
Fabien answer that symfony will not support HipHop as it does not speed-up
a lot the website
just need to decide if you want to use an @MappedSuperclass or a single or
joined table inheritance type :)
Marco Pivetta
http://twitter.com/Ocramius
http://marco-pivetta.com
On 14 June 2011 14:47, Jérémy Simonklein jeremy.simonkl...@gmail.comwrote:
Hi all,
I would want to create 2 different
You just have to use it with the global namespace!
Instead of
*$d = new DateTime();*
use
*$d = new \DateTime();* //please note the initial '\', which means we're
using a class from the global namespace :)
Marco Pivetta
@Ocramius http://twitter.com/Ocramius
http://marco-pivetta.com
On 20
You could use Xdebug and Cachegrind (or Webgrind) to check what's going
wrong in there by profiling script execution times and used resources ;)
Marco Pivetta
@Ocramius http://twitter.com/Ocramius
http://marco-pivetta.com
On 19 May 2011 09:57, Laxmi laxmipsa...@gmail.com wrote:
Hello,
I
$myEntity = $entityManager-merge($entity); //does the job :)
Marco Pivetta
@Ocramius http://twitter.com/Ocramius
http://marco-pivetta.com
On 18 May 2011 15:25, umpirsky umpir...@gmail.com wrote:
I have a wizard of few steps. Each step manage separate doctrine
entity, save it in session
only in step 1 (picker?) */
$modifiedUser = $em-getRepository('My\User')-findOneBy(array('fullname' =
'Marco Pivetta'));
$em-detach($modifiedUser);
$ns-user = $modifiedUser;
request 2:
$ns = new \Zend_Session_Namespace('test');
//Bringing my user entity back to life!
$modifiedUser = $ns-user;
$em
You should look at
Doctrine\Common\Annotations\AnnotationReader#setAnnotationNamespaceAlias($namespace,
$alias)
That should do the job if you set $namespace = 'orm' and $alias =
'Doctrine\ORM\Mapping'
Give it a try :)
Marco Pivetta
@Ocramius http://twitter.com/Ocramius
http://marco-pivetta.com
Careful! The entity manager's detach method does not return anything!
Marco Pivetta
@Ocramius http://twitter.com/Ocramius
http://marco-pivetta.com
On 16 May 2011 08:55, oscar balladares liebegr...@gmail.com wrote:
According what I have read so far, serialize/unserialize $entities
Sergio, don't worry about the two queries. Even on MySQL it is OFTEN true
that using SQL_CALC_FOUND_ROWS is slower than using two different queries.
Don't really know why, but I suppose it has to do with internal optimization
issues...
Marco Pivetta
@Ocramius http://twitter.com/Ocramius
http
, and if it's not cached, then you'll
get SLOW processing with lots of parsing behind the scenes.
I personally go for annotations, I like to see what references what directly
in my classes, and with a well-configured cache I don't have any troubles :)
Marco Pivetta
@Ocramius http
As far as I know, that is not supported by all vendors (see SQLite), thus
not by Doctrine 2.
You will have to add a COUNT() somewhere :)
Marco Pivetta
@Ocramius http://twitter.com/Ocramius
http://marco-pivetta.com
On 13 May 2011 18:33, SergioAlbatronic sergio.pe...@albatronic.com wrote:
Hi
Well, did you try with
http://www.doctrine-project.org/docs/orm/2.0/en/tutorials/getting-started-xml-edition.html?
Marco Pivetta
@Ocramius http://twitter.com/Ocramius
http://marco-pivetta.com
On 10 May 2011 09:00, user123 zolzaya...@gmail.com wrote:
Hi guys, I need a ORM tutorial. I'm coded
proxies! detach them from the entity manager first to get a clean POPO!)
Marco Pivetta
@Ocramius http://twitter.com/Ocramius
http://marco-pivetta.com
On 11 May 2011 01:10, Christophe COEVOET s...@notk.org wrote:
Le 10/05/2011 13:25, AndyPI a écrit :
Don't know if it helps, but changing my
though. You should really dive a bit in stuff like the ObjectHydrator and
look at what it does :)
Marco Pivetta
@Ocramius http://twitter.com/Ocramius
http://marco-pivetta.com
On 10 May 2011 19:14, Konrad Korzeniowski kon...@pandur.net wrote:
Hello!
Using symfony2 and doctrine I'm trying to build
Did you define a ManyToOne owning side?
Marco Pivetta
@Ocramius http://twitter.com/Ocramius
http://marco-pivetta.com
On 10 May 2011 21:35, Vincent Lechemin vincent.leche...@gmail.com wrote:
Hi,
I'm trying to use the entity type with a OneToMany relationship, but
it's not working
Could you expose the App\TestBundle\Entity\User class with annotations or
related mapping?
Marco Pivetta
@Ocramius http://twitter.com/Ocramius
http://marco-pivetta.com
On 11 May 2011 10:53, lidaa adilo...@gmail.com wrote:
Hi all;
I have the following error when I try to insert a new record
SQL is way faster than PHP processing. I would really go for a filtered
join. That's what SQL is there for :)
Just be sure to filter by index and to return a limited resultset.
Sequential scan in PHP has to be ABSOLUTELY avoided :)
Marco Pivetta
@Ocramius http://twitter.com/Ocramius
http://marco
Oh, sorry, forgot to mention that you should use the UNION syntax to fasten
up this stuff a bit. Avoid using OR operator in queries, it almost destroys
every attempt to use an index :)
Marco Pivetta
@Ocramius http://twitter.com/Ocramius
http://marco-pivetta.com
On 4 May 2011 12:21, Marco
Did you try with pdo_dblib?
http://www.php.net/manual/en/ref.pdo-dblib.php
Marco Pivetta
@Ocramius http://twitter.com/Ocramius
http://marco-pivetta.com
On 4 May 2011 13:07, apm korja...@gmail.com wrote:
Which driver i must use for doctrine/mssql ?
dbo_sqlsrv ??
I cant start this.
always
Entities are not generated by their setters or getters :)
Please take some time to look at the Object Hydrator ;)
Marco Pivetta
@Ocramius http://twitter.com/Ocramius
http://marco-pivetta.com
On 30 April 2011 02:34, sergio sergio.pe...@albatronic.com wrote:
Regarding doctrine:generate:entities
Just try
*$repo = $em-getRepository('Vendor\MyBundle\Entity\User');*
The EntityManager will resolve the correct EntityRepository for you ;)
Marco Pivetta
@Ocramius http://twitter.com/Ocramius
http://marco-pivetta.com
On 12 April 2011 17:02, Dmitry Bykadorov dmitry.bykado...@gmail.com wrote
25 matches
Mail list logo