[Logo]
Forums Register Login
Making a smarter use of Hibernate
Hi fellows cowboys,

I've been using (relying on) Hibernate for quite a while now, got my mappings right and wrote some "proxy" classes that make use of the mappings I define. It's working just fine but...

I'd like to make a smarter use of my Hibernate: mapping to better types, guaranteeing dependencies between tables in the db and so on.

For instance I have a UUID attribute of my class in Java that is stored in my db as a varchar and mapped as string. Can I possibly map to UUID instead? If so how?

I also have a table that contains a foreign key to another table. How can I ensure that Hibernate picks this up and prevents me from doing stupid things or - instead - cascade deletes items?

In other words, where can I find good tutorials that would show me how to better my use of Hibernate which has remained very basic.

Thanks,
David.
here's one link you may want to look at:

http://sandbox.sourcelabs.com/kosta/hibernate-bhw/index.html
Thanks, I will have a good read through it.
Start reading through the wiki at www.hibernate.org. For a book, I highly recommend "Java Persistence with Hibernate"

I commend you for seeing that there is much more to Hibernate than straight mapping. There is a lot to see here and a bit to learn, but knowing how Hibernate works so you can best utilize it, is what makes Hibernate so great.

Mark
Wink, wink, nudge, nudge, say no more ... https://richsoil.com/cards



All times above are in ranch (not your local) time.
The current ranch time is
Dec 13, 2017 21:18:49.