Re: JPQL

Tom Eugelink <[email protected]>
Newsgroups gmane.comp.programming.domain-driven-design
Message-ID <[email protected]>
Actually, my main motivation is performance, based on real world situation in a none-DDD software system that I'm maintaining right now. And I was wondering how to solve that in DDD.

The current implementation is process based; the logic loads a big list of entities, loops over them, then for each single one loads more entities, loops over those again, makes decisions and creates finally new entities based on the outcome. This runs over 60 minutes (I aborted it after an hour).

Then I rewrote the whole logic as a single JPQL query, plus one loop to create the entities, and it completely runs through in 1 minute.

The considerationis that the JPQL contains business logic. I would not want to store that in a persistency focused layer.

Regards, Tom



------------------------------------
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.