L
lightning
Many articles seem to told us that one table one dao is just fine and
hibernate are enough to do the business.
I also see the thread 'DAO patterns in the "Real World"' in this group
but I still don't get the answer.The author of the thread indeedly
give out a very good question but at last there are no solutions good
enough for that question.
In real world,logic can be much more complicated than which in the
tutorial,and performance is important,too.
Hibernate can deal with 1:n,n:m mapping,but that is very simple in the
real word, and in
In real project, may I wanna show some data in one table ,but which
row to be shown is decided by other tables.
use SQL,I can just select many ids from many different tables and at
last use a "where id in ..." to query some fieds in a table that I
need to show.
If Using DAO:
1, where should I put the SQL in?
2, Using hibernate, need I create one PO for every view?
3, If we really use DAO and hibernate to deal with this, how much
memory and cpu cycles would be wasted?
The key of the question is - what is the best practice of using dao in
the project to solve complex query or complex update??
hibernate are enough to do the business.
I also see the thread 'DAO patterns in the "Real World"' in this group
but I still don't get the answer.The author of the thread indeedly
give out a very good question but at last there are no solutions good
enough for that question.
In real world,logic can be much more complicated than which in the
tutorial,and performance is important,too.
Hibernate can deal with 1:n,n:m mapping,but that is very simple in the
real word, and in
In real project, may I wanna show some data in one table ,but which
row to be shown is decided by other tables.
use SQL,I can just select many ids from many different tables and at
last use a "where id in ..." to query some fieds in a table that I
need to show.
If Using DAO:
1, where should I put the SQL in?
2, Using hibernate, need I create one PO for every view?
3, If we really use DAO and hibernate to deal with this, how much
memory and cpu cycles would be wasted?
The key of the question is - what is the best practice of using dao in
the project to solve complex query or complex update??