Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Cloud/Virtualization forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

[Solved]Hibernate and unknown databases

 
Alex Armenteros
Ranch Hand
Posts: 75
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 10336
Eclipse IDE Hibernate Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic