• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

programmatic metadata manipulation

 
Peter Merker
Ranch Hand
Posts: 37
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

I'm in the process of implementing programmatic metadata manipulation. It's a bit difficult for me as there doesn't seem to be good documentation about this. In the JPWH book, there is just a short example which doesn't teach me much. So far I've been looking at org.hibernate.cfg.HbmBinder and org.hibernate.cfg.JDBCBinder (the latter is in Hibernate Tools). These classes use that functionality but lack documentation, so I'm still having problems. Is there some documentation or tutorial that I don't know about?
[Note: I posted this also in the Hibernate Forum, hope that is O.K. - really need an answer ASAP]
 
Peter Merker
Ranch Hand
Posts: 37
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thank you for your reply, Mark!
The Hibernate Reference just describes how to do programmatic configuration. I want to manipulate the mapping objects themselves. Their classes are in org.hibernate.mapping. As I wrote, HbmBinder and JDBCBinder work with them, but there are some things which I just don't understand.
 
Mark Spritzler
ranger
Sheriff
Posts: 17278
6
IntelliJ IDE Mac Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Peter Merker:
Thank you for your reply, Mark!
The Hibernate Reference just describes how to do programmatic configuration. I want to manipulate the mapping objects themselves. Their classes are in org.hibernate.mapping. As I wrote, HbmBinder and JDBCBinder work with them, but there are some things which I just don't understand.


Yeah, unformtunately to see the structure that Hibernate uses for this, I think you need to look at the Hibernate code itself for SessionFactory and Configuration objects, to see if you can find a public api to access that information. Or you can download all the Hibernate code, add you classes into the code base and rebuild Hibernate to include your classes, and maybe a new public api, if Hibernate doesn't already expose one.

Mark
 
Peter Merker
Ranch Hand
Posts: 37
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I got along now. Studying those two classes I mentioned and also Cfg2HbmTool and the Freemarker templates. This is Open Source, so I guess I can't complain about the missing documentation.
 
Mark Spritzler
ranger
Sheriff
Posts: 17278
6
IntelliJ IDE Mac Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Peter Merker:
I got along now. Studying those two classes I mentioned and also Cfg2HbmTool and the Freemarker templates. This is Open Source, so I guess I can't complain about the missing documentation.


Cool deal.

Mark
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic