Win a copy of The Business Blockchain this week in the Cloud forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Best practices for Hibernate and HQL queries

 
Himanshu Gupta
Ranch Hand
Posts: 598
Android Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Last day i was working and I wrote an HQL query like


The POJO I used in the above query was a mapped entity... and when my lead saw this he told me not to do this and to make a new class for that purpose.
I was not explained any reason.. as he told that this should be done making a new class which is not an entity.

Can someone here help me to figure out that why we follow this..

Moreover do we have some site or document stating the best practices like this.
I learned Hibernate and HQL direct working in project so I dont know much details...

Any kind of help will be highly appreciated.

Thanks in advance.

 
Himanshu Gupta
Ranch Hand
Posts: 598
Android Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Someone to help me here...
 
Himanshu Gupta
Ranch Hand
Posts: 598
Android Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
still waiting..
 
Don't get me started about those stupid light bulbs.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic