jQuery in Action, 2nd edition
The moose likes Object Relational Mapping and the fly likes Hibernate mapping:Bean class & MySQL DB View   Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login
JavaRanch » Java Forums » Java » Object Relational Mapping
Reply Bookmark "Hibernate mapping:Bean class & MySQL DB View   " Watch "Hibernate mapping:Bean class & MySQL DB View   " New topic
Author

Hibernate mapping:Bean class & MySQL DB View

kri shan
Ranch Hand

Joined: Apr 08, 2004
Posts: 1247
How can i do Hibernate mapping in hibernate mapping file (*.hbm.xml) for Bean class & MySQL DB View ?
nirumagics
Greenhorn

Joined: Jul 21, 2006
Posts: 15
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

Joined: Jul 21, 2006
Posts: 15
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

Joined: Apr 08, 2004
Posts: 1247
Here it's not a table. It's a view(virtual table).
kri shan
Ranch Hand

Joined: Apr 08, 2004
Posts: 1247
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 ?
Joy Mookerji
Ranch Hand

Joined: Jul 26, 2006
Posts: 49
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


SCJP 5<br />Brainbench Certified in C++<br />PMP<br />Dallas,TX
 
 
subject: Hibernate mapping:Bean class & MySQL DB View
 
Threads others viewed
hibernate primary key mapping - sequence
which DB to use for practice ? mysql or oracle?
Change Hypersonic DS to MySql DS
Hibernate: changing case of table name
MYSQL 5.0 Connection Time Out
IntelliJ Java IDE

cast iron skillet 49er

more from paul wheaton's glorious empire of web junk: cast iron skillet diatomaceous earth rocket mass heater sepp holzer raised garden beds raising chickens lawn care CFL flea control missoula heat permaculture