• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • paul wheaton
  • Jeanne Boyarsky
  • Ron McLeod
Sheriffs:
  • Paul Clapham
  • Liutauras Vilda
  • Devaka Cooray
Saloon Keepers:
  • Tim Holloway
  • Roland Mueller
Bartenders:

Loading the metadata of the table

 
Ranch Hand
Posts: 210
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Everyone..

I have a situation where i have to create a dynamic query based on a custom criteria that will be passed to me.

So, i plan to generate an HQL query from the dynamic criteria and execute the HQL.
but there will be certain validations that i will need to take care of(like the two entities that are passed in the custom criteria are indeed entities and validating the column names and getting their types...)..

I was thinking i could load the class metadata and use it for all my requirements...
Another option is storing all these attributes of the tables, their columns and their attributes in another table and querying that table to get the required info.

Which of these two is a better option.
How expensive is getting the metadata of a particular entity....
I think since hibernate already loads the metadata when it starts up, getting it should be pretty inexpensive...

What are your thoughts on this?

Thank you,

Rahul
 
Rahul Babbar
Ranch Hand
Posts: 210
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Any comments please...
 
You may have just won ten million dollars! Or, maybe a tiny ad.
Smokeless wood heat with a rocket mass heater
https://woodheat.net
reply
    Bookmark Topic Watch Topic
  • New Topic