Journal FortKnox's Journal: Java Users: Hibernate - A -must- see 10
Everything I've always wanted out of JDBC has been done with the open source project, hibernate. What is it? Simply an object relation mapper. Basically, you feed it an object (and the object has an xml that maps the object to a table and stuff[1]) and it will map it to a database and do all the jdbc to get the info and update/insert the data. Other nice things include one-to-many, many-to-many, and many-to-one mappings. You don't have to worry about foreign keys or anything (except in the xml mapping files) because it will automatically get your object instead of just the foreign key (even lazy loading is available).
It -really- makes JDBC simple in java. You just make normal java objects, and feed it into hibernate to do your persisting. It all happens in real time (using reflexion and other fancy things) so it isn't a code generator, but an api. I really suggest taking a look at the project. Really does some amazing things.
[1] - of course, if you are into the 'XDoclet' scene, you can have xdoclet write all the xml for you with its javadoc hibernate tags. And ant has hibernate tasks, including creating the tables and stuff...
It -really- makes JDBC simple in java. You just make normal java objects, and feed it into hibernate to do your persisting. It all happens in real time (using reflexion and other fancy things) so it isn't a code generator, but an api. I really suggest taking a look at the project. Really does some amazing things.
[1] - of course, if you are into the 'XDoclet' scene, you can have xdoclet write all the xml for you with its javadoc hibernate tags. And ant has hibernate tasks, including creating the tables and stuff...
Be careful (Score:2)
Do you know how it handles that aspect of things?
Re:Be careful (Score:2)
Re:Be careful (Score:2)
Do you know what version of SQL it's using?
EJB, JDO? (Score:2)
Re:EJB, JDO? (Score:2)
Reflection is pretty sweet (Score:2)
It's great
OQL (Score:2)
Faster (Score:2)
torque this, buddy! (Score:2)
Technology is cool.
-j
so much to learn .... (Score:2)