aspose file tools*
The moose likes Object Relational Mapping and the fly likes Hibernate Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Databases » Object Relational Mapping
Bookmark "Hibernate " Watch "Hibernate " New topic
Author

Hibernate

meena latha
Ranch Hand

Joined: Jan 24, 2005
Posts: 219
Hi all .

Not sure where to post this.Anyhow below is my problem.
I am trying to learn hibernate.
I found out a link http://www.onjava.com/pub/a/onjava/2004/06/23/hibernate.html?page=1thats says how to work with hibernate.
It will be great if you can let me whether i can try out this using Eclipse,Tomcat server and MSAccess as the data base.

Thanks in Advance
Ilja Preuss
author
Sheriff

Joined: Jul 11, 2001
Posts: 14112
The use of Tomcat is totally orthogonal to Hibernate.

Eclipse doesn't stand in the way either. In fact there are some eclipse plugins for hibernate that might help (google for them), although they are not a prerequisite.

I'm reluctant to call MS Access a *database*, though. Not sure wether Hibernate is able to handle that thing.

Moving to our ORM forum...


The soul is dyed the color of its thoughts. Think only on those things that are in line with your principles and can bear the light of day. The content of your character is your choice. Day by day, what you do is who you become. Your integrity is your destiny - it is the light that guides your way. - Heraclitus
meena latha
Ranch Hand

Joined: Jan 24, 2005
Posts: 219
I totally understand that MS Access is not a right choice.
So let me put my question this way to basically practise Hibernate from home what should i basically have.

Thanks
Ramya.A
[ December 28, 2005: Message edited by: ramya jai ]
Jignesh Patel
Ranch Hand

Joined: Nov 03, 2001
Posts: 626

You can use HQLDB, coming with Hibernate, which I have never tried.

And if you have MYSQL or any other relation DB.
Create a database connection by using type3 or type 4 driver with DB.
Check the connection is created properly.

Once it is done
create a test table with 1 or 2 column.
crate a class with getter and setter methods for those columns.
crate a hibernate mapping in hbm.xml file(make sure the file is in your classpath.
create a client class, pass a value and see whether it is stored or not.

You don't need any container for this. POJO is enough.
Michael Duffy
Ranch Hand

Joined: Oct 15, 2005
Posts: 163
Originally posted by Ilja Preuss:
The use of Tomcat is totally orthogonal to Hibernate.

Eclipse doesn't stand in the way either. In fact there are some eclipse plugins for hibernate that might help (google for them), although they are not a prerequisite.

I'm reluctant to call MS Access a *database*, though. Not sure wether Hibernate is able to handle that thing.

Moving to our ORM forum...


There's no support for Access in Hibernate.


%
Jeff Albertson
Ranch Hand

Joined: Sep 16, 2005
Posts: 1780
Originally posted by Michael Duffy:
There's no support for Access in Hibernate.


Touch´┐Ż


There is no emoticon for what I am feeling!
Gregg Bolinger
GenRocket Founder
Ranch Hand

Joined: Jul 11, 2001
Posts: 15299
    
    6

Originally posted by Michael Duffy:


There's no support for Access in Hibernate.


Not 100% accurate. You can use the JDBC/ODBC bridge and the basic dialect. If your queries very basic, it will work, most of the time.


GenRocket - Experts at Building Test Data
Michael Duffy
Ranch Hand

Joined: Oct 15, 2005
Posts: 163
Originally posted by Gregg Bolinger:


Not 100% accurate. You can use the JDBC/ODBC bridge and the basic dialect. If your queries very basic, it will work, most of the time.


Which SQL dialect do you tell Hibernate to use in that case? GenericDialect?

I thought I read that there was no support for Access in Hibernate, but that might have been true of 2.x.

I see that NHibernate supports Access now, but there was no such thing when I first became aware of Hibernate.
Daniel Prene
Ranch Hand

Joined: Jul 15, 2005
Posts: 241
Don't consider using any hibernate plugins untill you've learned hibernate. Once you know hibernate you can go two ways: One, use the plugins wihout taking away valuable experience and learning, or two, realize that most of the plugins suck and aren't worth using.

Good luck!
-D.P.
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
 
subject: Hibernate