Meaningless Drivel is fun!*
The moose likes Object Relational Mapping and the fly likes [Solved]Hibernate and unknown databases Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Databases » Object Relational Mapping
Bookmark "[Solved]Hibernate and unknown databases" Watch "[Solved]Hibernate and unknown databases" New topic
Author

[Solved]Hibernate and unknown databases

Alex Armenteros
Ranch Hand

Joined: May 05, 2010
Posts: 69
Hello again my fellow ranchers, I'm back again with another question...


It's possible to hibernate to get info from a table without doing a mapping cause that table's structure is unknown to the developer? (without going back to use native SQL)

Edit:

without going back to use native SQL=old fashioned JDBC.

That's what I wanted to say.

Thanks for your quick reply.
Paul Sturrock
Bartender

Joined: Apr 14, 2004
Posts: 10336

No, the mapping needs to exist.You can use Hibernate tools to generate mappings files or aonnotated classes from a database but this isn't really something you could do at runtime.

You don't however need to use Hibernate or native SQL to get information about a table. you can get that from godd old fashioned JDBC.


JavaRanch FAQ HowToAskQuestionsOnJavaRanch
 
wood burning stoves
 
subject: [Solved]Hibernate and unknown databases
 
Similar Threads
Schema Export Unsuccesful
Creating a "stored procedure" with HIbernate
alternate Floor function in JPA
Hibernate Native SQL versus iBATIS
Why I can't run Web Start when my class using hibernate?