ZF2 issue report (2013-08-22) - result for Zend\Db

classic Classic list List threaded Threaded
43 messages Options
123
Reply | Threaded
Open this post in threaded view
|

Re: ZF2 issue report (2013-08-22) - result for Zend\Db

Michael Gooden
I just did that for an application that uses SQL Server 2008 and quite complex schema. Ran reverse engineer, create entites with annotations, then just fixed the annotations for the relationships. Now I have POPOs that correspond to the legacy db, all handled via Doctrine2 Entity Manager. Try replicate that in pure Zend\Db in same or less time and effort.


On 27 August 2013 14:42, Gary Hockin <[hidden email]> wrote:
Try adding Doctrine to a project that has a complex legacy database :D

G


On Tue, Aug 27, 2013 at 1:32 PM, Stefano Torresi <[hidden email]> wrote:
While the whole "right tool for the job" argument may have its points, I don't see the problem with this specific instance. IMHO Doctrine gets easier the simpler the project is. I have used it very small projects where I only needed a single table in a sqlite db: it was glaringly fast to set up, and still provided a good, reliable and extensible persistence layer.

I definitely didn't feel like turning a screw with a hammer. I just used a big hammer on a small nail and that made nailing faster, as one would expect :P


Reply | Threaded
Open this post in threaded view
|

Re: ZF2 issue report (2013-08-22) - result for Zend\Db

zburnham
Michael: So how much is Pixar charging you to use their render farm to serve your app?


On Tue, Aug 27, 2013 at 10:06 AM, Michael Gooden <[hidden email]> wrote:
I just did that for an application that uses SQL Server 2008 and quite complex schema. Ran reverse engineer, create entites with annotations, then just fixed the annotations for the relationships. Now I have POPOs that correspond to the legacy db, all handled via Doctrine2 Entity Manager. Try replicate that in pure Zend\Db in same or less time and effort.


On 27 August 2013 14:42, Gary Hockin <[hidden email]> wrote:
Try adding Doctrine to a project that has a complex legacy database :D

G


On Tue, Aug 27, 2013 at 1:32 PM, Stefano Torresi <[hidden email]> wrote:
While the whole "right tool for the job" argument may have its points, I don't see the problem with this specific instance. IMHO Doctrine gets easier the simpler the project is. I have used it very small projects where I only needed a single table in a sqlite db: it was glaringly fast to set up, and still provided a good, reliable and extensible persistence layer.

I definitely didn't feel like turning a screw with a hammer. I just used a big hammer on a small nail and that made nailing faster, as one would expect :P



Reply | Threaded
Open this post in threaded view
|

Re: ZF2 issue report (2013-08-22) - result for Zend\Db

Axel
In reply to this post by Spabby
+1

I would recommend to provide a ORM as a module for ZF2 instead of adding
such a functionality to the framework core. In some case even the
TableGateway is enough. But I see a need for a more leightweight
solution than Doctrine as well.

I'm working on such a solution because my company needs one, and they
need it asap (and Doctrine is no option - we'd have used it if
possible). That's why I wanted to share this info.

Just my 2 cents.


Am 27.08.2013 14:42, schrieb Gary Hockin:
> Try adding Doctrine to a project that has a complex legacy database :D



Reply | Threaded
Open this post in threaded view
|

Re: ZF2 issue report (2013-08-22) - result for Zend\Db

Axel
In reply to this post by Michael Gooden
When i did I failed due to comosite primary keys in relations.
I just checked the Doctrine docs, and this seems to be possible now in 2.1:

> For Doctrine 2.0 composite keys of primitive data-types are supported, for Doctrine 2.1 even foreign
> keys as primary keys are supported.

http://docs.doctrine-project.org/en/2.0.x/tutorials/composite-primary-keys.html

Worth to take a look ...


Am 27.08.2013 16:06, schrieb Michael Gooden:
I just did that for an application that uses SQL Server 2008 and quite complex schema. Ran reverse engineer, create entites with annotations, then just fixed the annotations for the relationships. Now I have POPOs that correspond to the legacy db, all handled via Doctrine2 Entity Manager. Try replicate that in pure Zend\Db in same or less time and effort.


On 27 August 2013 14:42, Gary Hockin <[hidden email]> wrote:
Try adding Doctrine to a project that has a complex legacy database :D

G


On Tue, Aug 27, 2013 at 1:32 PM, Stefano Torresi <[hidden email]> wrote:
While the whole "right tool for the job" argument may have its points, I don't see the problem with this specific instance. IMHO Doctrine gets easier the simpler the project is. I have used it very small projects where I only needed a single table in a sqlite db: it was glaringly fast to set up, and still provided a good, reliable and extensible persistence layer.

I definitely didn't feel like turning a screw with a hammer. I just used a big hammer on a small nail and that made nailing faster, as one would expect :P



Reply | Threaded
Open this post in threaded view
|

Re: ZF2 issue report (2013-08-22) - result for Zend\Db

ThaDafinser
In reply to this post by Spabby
Hello together,

i didn't wanted to treat such a discussion out of this report....
But when there is already a discussion going on, my personal two cents:
- if someone wants an ORM or a "like ORM", then use a ORM like Doctrine or Propel...don't bend Zend\Db to be one
- as long as Zend\Db exists and more features/requests are coming in, the more it will become a "ORM like" abstraction (i think between ZF1 / ZF2 there was a big step in this direction....)
- many ressources are invested to keep Zend\Db stable and up-to-date
- ...

I hope no one takes the next paragraph personally, i also used Zend\Db in ZF1 a lot and it worked great, but:
I personally would completely remove Zend\Db...and so gain ressources to create other cool stuff.

Even if someone don't want to use a complete ORM, there are also many DBAL around which work.

Best regards
Martin
Reply | Threaded
Open this post in threaded view
|

Re: ZF2 issue report (2013-08-22) - result for Zend\Db

Kyle Spraggs

If you don't like Doctrine ORM there is the plain Jane DBAL component which works great. I'm also in the "remove Zend\Db" camp but that's only because I want Ralph to focus his efforts elsewhere. I'm selfish.

On Aug 27, 2013 9:22 AM, "Martin Keckeis" <[hidden email]> wrote:
Hello together,

i didn't wanted to treat such a discussion out of this report....
But when there is already a discussion going on, my personal two cents:
- if someone wants an ORM or a "like ORM", then use a ORM like Doctrine or Propel...don't bend Zend\Db to be one
- as long as Zend\Db exists and more features/requests are coming in, the more it will become a "ORM like" abstraction (i think between ZF1 / ZF2 there was a big step in this direction....)
- many ressources are invested to keep Zend\Db stable and up-to-date
- ...

I hope no one takes the next paragraph personally, i also used Zend\Db in ZF1 a lot and it worked great, but:
I personally would completely remove Zend\Db...and so gain ressources to create other cool stuff.

Even if someone don't want to use a complete ORM, there are also many DBAL around which work.

Best regards
Martin
Reply | Threaded
Open this post in threaded view
|

Re: ZF2 issue report (2013-08-22) - result for Zend\Db

Stefano Torresi
In reply to this post by ThaDafinser
CONTENTS DELETED
The author has deleted this message.
Reply | Threaded
Open this post in threaded view
|

Re: ZF2 issue report (2013-08-22) - result for Zend\Db

Spabby
Ooops, I accidentally went off topic. I have no desire to see an ORM build on Zend\Db, but believe that Zend\Db has it's place. There, I said it.


On Tue, Aug 27, 2013 at 3:30 PM, Stefano Torresi <[hidden email]> wrote:
2013/8/27 Gary Hockin <[hidden email]>
Try adding Doctrine to a project that has a complex legacy database :D
G

Is that a use case for a new lightweight ORM in Zend\Db ? :-P


2013/8/27 Zachary Burnham <[hidden email]>
Using Doctrine for a project with a single table in a sqlite database strikes me as using a wrecking ball to play Jenga.
 
It's much more feasible than you're making, performance is usually not the main concern of small projects.


2013/8/27 Axel <[hidden email]>
I'm working on such a solution because my company needs one, and they need it asap (and Doctrine is no option - we'd have used it if possible). That's why I wanted to share this info.

If execution time is your main factor, imo coding a new software doesn't appear to be the best solution.
There is plenty of alternatives to Doctrine around, as Martin Keckeis just wrote.

Reply | Threaded
Open this post in threaded view
|

Re: ZF2 issue report (2013-08-22) - result for Zend\Db

ThaDafinser
In reply to this post by Kyle Spraggs
2013/8/27 Kyle Spraggs <[hidden email]>

If you don't like Doctrine ORM there is the plain Jane DBAL component which works great. I'm also in the "remove Zend\Db" camp but that's only because I want Ralph to focus his efforts elsewhere. I'm selfish.

That would be exactly the benefit :-)
Reply | Threaded
Open this post in threaded view
|

Re: ZF2 issue report (2013-08-22) - result for Zend\Db

zburnham
Remove it and use what instead?  Doctrine?

I guess, so long as you never want anyone to use your framework..


On Tue, Aug 27, 2013 at 10:37 AM, Martin Keckeis <[hidden email]> wrote:
2013/8/27 Kyle Spraggs <[hidden email]>

If you don't like Doctrine ORM there is the plain Jane DBAL component which works great. I'm also in the "remove Zend\Db" camp but that's only because I want Ralph to focus his efforts elsewhere. I'm selfish.

That would be exactly the benefit :-)

Reply | Threaded
Open this post in threaded view
|

Re: ZF2 issue report (2013-08-22) - result for Zend\Db

Spabby
mysql_query()


On Tue, Aug 27, 2013 at 3:39 PM, Zachary Burnham <[hidden email]> wrote:
Remove it and use what instead?  Doctrine?

I guess, so long as you never want anyone to use your framework..


On Tue, Aug 27, 2013 at 10:37 AM, Martin Keckeis <[hidden email]> wrote:
2013/8/27 Kyle Spraggs <[hidden email]>

If you don't like Doctrine ORM there is the plain Jane DBAL component which works great. I'm also in the "remove Zend\Db" camp but that's only because I want Ralph to focus his efforts elsewhere. I'm selfish.

That would be exactly the benefit :-)


Reply | Threaded
Open this post in threaded view
|

Re: ZF2 issue report (2013-08-22) - result for Zend\Db

zburnham
BURN THE WITCH


On Tue, Aug 27, 2013 at 10:39 AM, Gary Hockin <[hidden email]> wrote:
mysql_query()


On Tue, Aug 27, 2013 at 3:39 PM, Zachary Burnham <[hidden email]> wrote:
Remove it and use what instead?  Doctrine?

I guess, so long as you never want anyone to use your framework..


On Tue, Aug 27, 2013 at 10:37 AM, Martin Keckeis <[hidden email]> wrote:
2013/8/27 Kyle Spraggs <[hidden email]>

If you don't like Doctrine ORM there is the plain Jane DBAL component which works great. I'm also in the "remove Zend\Db" camp but that's only because I want Ralph to focus his efforts elsewhere. I'm selfish.

That would be exactly the benefit :-)



Reply | Threaded
Open this post in threaded view
|

Re: ZF2 issue report (2013-08-22) - result for Zend\Db

Marco Pivetta
In reply to this post by zburnham
@Zachary I may be the worst advertiser of his own tools, and I'm biased since I also am part of doctrine, but yes, it may not be a stupid idea to let that go.

It is not a question of "people, gather around! people! Look at our miracolous framework! Buy it! Use it!"

It is a question of giving the best possible tool to the community, regardless if they use it or not (I have loads of repositories that I spent weeks developing, and not a single dog uses them. I don't care, I keep on developing).
If there is a better tool around it doesn't mean that yours shouldn't exist though.




On 27 August 2013 16:39, Zachary Burnham <[hidden email]> wrote:
Remove it and use what instead?  Doctrine?

I guess, so long as you never want anyone to use your framework..


On Tue, Aug 27, 2013 at 10:37 AM, Martin Keckeis <[hidden email]> wrote:
2013/8/27 Kyle Spraggs <[hidden email]>

If you don't like Doctrine ORM there is the plain Jane DBAL component which works great. I'm also in the "remove Zend\Db" camp but that's only because I want Ralph to focus his efforts elsewhere. I'm selfish.

That would be exactly the benefit :-)


Reply | Threaded
Open this post in threaded view
|

Re: ZF2 issue report (2013-08-22) - result for Zend\Db

Spabby
Speaking of which when will you get my proxy changes done?


On Tue, Aug 27, 2013 at 3:43 PM, Marco Pivetta <[hidden email]> wrote:
@Zachary I may be the worst advertiser of his own tools, and I'm biased since I also am part of doctrine, but yes, it may not be a stupid idea to let that go.

It is not a question of "people, gather around! people! Look at our miracolous framework! Buy it! Use it!"

It is a question of giving the best possible tool to the community, regardless if they use it or not (I have loads of repositories that I spent weeks developing, and not a single dog uses them. I don't care, I keep on developing).
If there is a better tool around it doesn't mean that yours shouldn't exist though.




On 27 August 2013 16:39, Zachary Burnham <[hidden email]> wrote:
Remove it and use what instead?  Doctrine?

I guess, so long as you never want anyone to use your framework..


On Tue, Aug 27, 2013 at 10:37 AM, Martin Keckeis <[hidden email]> wrote:
2013/8/27 Kyle Spraggs <[hidden email]>

If you don't like Doctrine ORM there is the plain Jane DBAL component which works great. I'm also in the "remove Zend\Db" camp but that's only because I want Ralph to focus his efforts elsewhere. I'm selfish.

That would be exactly the benefit :-)



Reply | Threaded
Open this post in threaded view
|

Re: ZF2 issue report (2013-08-22) - result for Zend\Db

Eddie Abou-Jaoude
My 2 pence (London baby)...
 
Doctrine is a good ORM, however I prefer Zend DB & using my own mappers because I can easily switch from a database to different datasource (i.e. API).
 
 
On 27 August 2013 at 15:45 Gary Hockin <[hidden email]> wrote:

Speaking of which when will you get my proxy changes done?


On Tue, Aug 27, 2013 at 3:43 PM, Marco Pivetta <[hidden email]> wrote:
@Zachary I may be the worst advertiser of his own tools, and I'm biased since I also am part of doctrine, but yes, it may not be a stupid idea to let that go.

It is not a question of "people, gather around! people! Look at our miracolous framework! Buy it! Use it!"
It is a question of giving the best possible tool to the community, regardless if they use it or not (I have loads of repositories that I spent weeks developing, and not a single dog uses them. I don't care, I keep on developing).
If there is a better tool around it doesn't mean that yours shouldn't exist though.




On 27 August 2013 16:39, Zachary Burnham <[hidden email]> wrote:
Remove it and use what instead?  Doctrine?
 
I guess, so long as you never want anyone to use your framework..


On Tue, Aug 27, 2013 at 10:37 AM, Martin Keckeis <[hidden email]> wrote:
2013/8/27 Kyle Spraggs <[hidden email]>

If you don't like Doctrine ORM there is the plain Jane DBAL component which works great. I'm also in the "remove Zend\Db" camp but that's only because I want Ralph to focus his efforts elsewhere. I'm selfish.

That would be exactly the benefit :-)

 
Reply | Threaded
Open this post in threaded view
|

Re: ZF2 issue report (2013-08-22) - result for Zend\Db

Marco Pivetta
<info>Doctrine is an _ORGANIZATION_. We have _DOZENS_ of active projects :P ORM is just the major project. Stop thinking that Doctrine == ORM.</info>

Thanks :P



On 27 August 2013 17:00, Eddie Jaoude <[hidden email]> wrote:
My 2 pence (London baby)...
 
Doctrine is a good ORM, however I prefer Zend DB & using my own mappers because I can easily switch from a database to different datasource (i.e. API).
 
 
On 27 August 2013 at 15:45 Gary Hockin <[hidden email]> wrote:

Speaking of which when will you get my proxy changes done?


On Tue, Aug 27, 2013 at 3:43 PM, Marco Pivetta <[hidden email]> wrote:
@Zachary I may be the worst advertiser of his own tools, and I'm biased since I also am part of doctrine, but yes, it may not be a stupid idea to let that go.

It is not a question of "people, gather around! people! Look at our miracolous framework! Buy it! Use it!"
It is a question of giving the best possible tool to the community, regardless if they use it or not (I have loads of repositories that I spent weeks developing, and not a single dog uses them. I don't care, I keep on developing).
If there is a better tool around it doesn't mean that yours shouldn't exist though.




On 27 August 2013 16:39, Zachary Burnham <[hidden email]> wrote:
Remove it and use what instead?  Doctrine?
 
I guess, so long as you never want anyone to use your framework..


On Tue, Aug 27, 2013 at 10:37 AM, Martin Keckeis <[hidden email]> wrote:
2013/8/27 Kyle Spraggs <[hidden email]>

If you don't like Doctrine ORM there is the plain Jane DBAL component which works great. I'm also in the "remove Zend\Db" camp but that's only because I want Ralph to focus his efforts elsewhere. I'm selfish.

That would be exactly the benefit :-)

 

Reply | Threaded
Open this post in threaded view
|

Re: ZF2 issue report (2013-08-22) - result for Zend\Db

Spabby
Doctrine IS the ORM, all the other projects are shit. Don't even mention the DBAL, Zend\Db smashes it into next week.


On Tue, Aug 27, 2013 at 4:03 PM, Marco Pivetta <[hidden email]> wrote:
<info>Doctrine is an _ORGANIZATION_. We have _DOZENS_ of active projects :P ORM is just the major project. Stop thinking that Doctrine == ORM.</info>

Thanks :P
On 27 August 2013 17:00, Eddie Jaoude <[hidden email]> wrote:
My 2 pence (London baby)...
 
Doctrine is a good ORM, however I prefer Zend DB & using my own mappers because I can easily switch from a database to different datasource (i.e. API).
 
 
On 27 August 2013 at 15:45 Gary Hockin <[hidden email]> wrote:

Speaking of which when will you get my proxy changes done?


On Tue, Aug 27, 2013 at 3:43 PM, Marco Pivetta <[hidden email]> wrote:
@Zachary I may be the worst advertiser of his own tools, and I'm biased since I also am part of doctrine, but yes, it may not be a stupid idea to let that go.

It is not a question of "people, gather around! people! Look at our miracolous framework! Buy it! Use it!"
It is a question of giving the best possible tool to the community, regardless if they use it or not (I have loads of repositories that I spent weeks developing, and not a single dog uses them. I don't care, I keep on developing).
If there is a better tool around it doesn't mean that yours shouldn't exist though.




On 27 August 2013 16:39, Zachary Burnham <[hidden email]> wrote:
Remove it and use what instead?  Doctrine?
 
I guess, so long as you never want anyone to use your framework..


On Tue, Aug 27, 2013 at 10:37 AM, Martin Keckeis <[hidden email]> wrote:
2013/8/27 Kyle Spraggs <[hidden email]>

If you don't like Doctrine ORM there is the plain Jane DBAL component which works great. I'm also in the "remove Zend\Db" camp but that's only because I want Ralph to focus his efforts elsewhere. I'm selfish.

That would be exactly the benefit :-)

 


Reply | Threaded
Open this post in threaded view
|

Re: ZF2 issue report (2013-08-22) - result for Zend\Db

Spabby
I take that back, the annotation parser is OK.


On Tue, Aug 27, 2013 at 4:05 PM, Gary Hockin <[hidden email]> wrote:
Doctrine IS the ORM, all the other projects are shit. Don't even mention the DBAL, Zend\Db smashes it into next week.


On Tue, Aug 27, 2013 at 4:03 PM, Marco Pivetta <[hidden email]> wrote:
<info>Doctrine is an _ORGANIZATION_. We have _DOZENS_ of active projects :P ORM is just the major project. Stop thinking that Doctrine == ORM.</info>

Thanks :P
On 27 August 2013 17:00, Eddie Jaoude <[hidden email]> wrote:
My 2 pence (London baby)...
 
Doctrine is a good ORM, however I prefer Zend DB & using my own mappers because I can easily switch from a database to different datasource (i.e. API).
 
 
On 27 August 2013 at 15:45 Gary Hockin <[hidden email]> wrote:

Speaking of which when will you get my proxy changes done?


On Tue, Aug 27, 2013 at 3:43 PM, Marco Pivetta <[hidden email]> wrote:
@Zachary I may be the worst advertiser of his own tools, and I'm biased since I also am part of doctrine, but yes, it may not be a stupid idea to let that go.

It is not a question of "people, gather around! people! Look at our miracolous framework! Buy it! Use it!"
It is a question of giving the best possible tool to the community, regardless if they use it or not (I have loads of repositories that I spent weeks developing, and not a single dog uses them. I don't care, I keep on developing).
If there is a better tool around it doesn't mean that yours shouldn't exist though.




On 27 August 2013 16:39, Zachary Burnham <[hidden email]> wrote:
Remove it and use what instead?  Doctrine?
 
I guess, so long as you never want anyone to use your framework..


On Tue, Aug 27, 2013 at 10:37 AM, Martin Keckeis <[hidden email]> wrote:
2013/8/27 Kyle Spraggs <[hidden email]>

If you don't like Doctrine ORM there is the plain Jane DBAL component which works great. I'm also in the "remove Zend\Db" camp but that's only because I want Ralph to focus his efforts elsewhere. I'm selfish.

That would be exactly the benefit :-)

 



Reply | Threaded
Open this post in threaded view
|

Re: ZF2 issue report (2013-08-22) - result for Zend\Db

Michael Gooden
In reply to this post by Eddie Abou-Jaoude
All I do to solve this little issue is to wrap the entity repository with a mapper, defined by a mapper interface. Then I can swop my entire persistence layer by implementing the interface.
Regards,

Michael Gooden

From: Eddie Jaoude <[hidden email]>
Date: Tue, 27 Aug 2013 16:00:28 +0100 (BST)
To: Gary Hockin<[hidden email]>; Marco Pivetta<[hidden email]>
ReplyTo: Eddie Jaoude <[hidden email]>
Subject: Re: [zf-contributors] ZF2 issue report (2013-08-22) - result for Zend\Db

My 2 pence (London baby)...
 
Doctrine is a good ORM, however I prefer Zend DB & using my own mappers because I can easily switch from a database to different datasource (i.e. API).
 
 
On 27 August 2013 at 15:45 Gary Hockin <[hidden email]> wrote:

Speaking of which when will you get my proxy changes done?


On Tue, Aug 27, 2013 at 3:43 PM, Marco Pivetta <[hidden email]> wrote:
@Zachary I may be the worst advertiser of his own tools, and I'm biased since I also am part of doctrine, but yes, it may not be a stupid idea to let that go.

It is not a question of "people, gather around! people! Look at our miracolous framework! Buy it! Use it!"
It is a question of giving the best possible tool to the community, regardless if they use it or not (I have loads of repositories that I spent weeks developing, and not a single dog uses them. I don't care, I keep on developing).
If there is a better tool around it doesn't mean that yours shouldn't exist though.




On 27 August 2013 16:39, Zachary Burnham <[hidden email]> wrote:
Remove it and use what instead?  Doctrine?
 
I guess, so long as you never want anyone to use your framework..


On Tue, Aug 27, 2013 at 10:37 AM, Martin Keckeis <[hidden email]> wrote:
2013/8/27 Kyle Spraggs <[hidden email]>

If you don't like Doctrine ORM there is the plain Jane DBAL component which works great. I'm also in the "remove Zend\Db" camp but that's only because I want Ralph to focus his efforts elsewhere. I'm selfish.

That would be exactly the benefit :-)

 
Reply | Threaded
Open this post in threaded view
|

Re: ZF2 issue report (2013-08-22) - result for Zend\Db

Axel
In reply to this post by Axel
Well this should be no philosophy discussion. Calm down a bit, ok?

I know there is a great and widely used ORM: Doctrine. But the comment from Martin Keckis seems to show that there is a need for a different kind of ORM based on Zend\Db (what ever that may look like).

If this is not the case, then fine, just wanted to figure it out. I don't want to see an ORM in the the ZF core as well more an optional module or component. And definitely no "Doctrine killer"...


Am 27.08.2013 10:12, schrieb Axel:
Hi Everybody,

Am 22.08.2013 21:03, schrieb Martin Keckeis:

When going through the list and looking what requests are in, I feel like that most people want an ORM like Doctrine, if they use Zend\Db.


Interesting, I'm currently implementing a simple ORM solution based on the zf2 TableGateway classes.
This is not yet complete and will still receive major design changes.

Here's what I've got so far: https://github.com/tux-rampage/rampage-php/tree/master/library/rampage/simpleorm

Basic theory:
- TableGateways are repositories
- An EntityManager aggregates them and a UnitOfWork instance
- Classes can annotate repositories with @Repository the UnitOfWork/EntityManager will use this to find the repository for an object.
- Repositories may aggregate other TableGatways to handle refereneces (this completely up to the developer)
- Data from objects is automatically extracted via a hydrator instance
- Additional TableGateway features provide automatic configuration of the hydrator instance by using the metadata, populating the last insert id, etc...
- Utilize database transactions if possible when flushing the UnitOfWork.

So you could do something like that:
$serviceManager->get('EntityManager')->persist($object)->flush();


Any thoughts? Worth to port it to a standalone ZF component? Suggestions are welcome.

123