• 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
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Hibernate mapping:Bean class & MySQL DB View

 
Ranch Hand
Posts: 1491
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
How can i do Hibernate mapping in hibernate mapping file (*.hbm.xml) for Bean class & MySQL DB View ?
 
Greenhorn
Posts: 15
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
How can i do Hibernate mapping in hibernate mapping file (*.hbm.xml) for Bean class & MySQL DB View ?
------------------------------

Dear shan,

For any Database u have to write one config file(like hibernate.cfg.xml)
in that config file u have to write all database properties (that u want to use) and finally u have to map that hibernate mapping file.

In that mapping file u have to map each property of DTO Class with an primary key.
 
nirumagics
Greenhorn
Posts: 15
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
How can i do Hibernate mapping in hibernate mapping file (*.hbm.xml) for Bean class & MySQL DB View ?
------------------------------

Dear shan,

For any Database u have to write one config file(like hibernate.cfg.xml)
in that config file u have to write all database properties (that u want to use) and finally u have to map that hibernate mapping file.

In that mapping file u have to map each property of DTO Class with an primary key.
 
kri shan
Ranch Hand
Posts: 1491
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Here it's not a table. It's a view(virtual table).
 
kri shan
Ranch Hand
Posts: 1491
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Basically View is not a base table. How can i map(in the hibernate mapping file *.hbm.xml) view with the Bean ?
<Class name='' table=''> Can i mention view name as table name here ?
 
Ranch Hand
Posts: 49
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Guys,
I have struggled a lot for a whole day as able to configure hibernate to read from Oracle.
See my code samples on my topic Hibernate Configuration
 
These are the worst of times and these are the best of times. And this is the best tiny ad:
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic