I am uncapable of figuring out what the required are pieces are
for dynamic-class.
Although this is an alpha feature, I think it's a beginner's question.
For the DTD it looks like there's little syntactical difference,
so I changed a <class> to a <dynamic-class>, after verifying
that the static mapping still works. (just a composite-id and
a few properties).
Now I get:
1272 [main] ERROR net.sf.hibernate.cfg.Configuration - Could not configure datastore from file: stupid.xml
java.lang.NullPointerException
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:141)
at net.sf.hibernate.util.ReflectHelper.classForName(ReflectHelper.java:87)
at net.sf.hibernate.mapping.Component.getComponentClass(Component.java:82)
at net.sf.hibernate.cfg.Binder.bindComponent(Binder.java:877)
at net.sf.hibernate.cfg.Binder.bindComposite(Binder.java:774)
at net.sf.hibernate.cfg.Binder.bindRootClass(Binder.java:293)
at net.sf.hibernate.cfg.Binder.bindRoot(Binder.java:1243)
at net.sf.hibernate.cfg.Configuration.add(Configuration.java:248)
at net.sf.hibernate.cfg.Configuration.addFile(Configuration.java:170)
Of course I realize that I have to do something extra, but I'm not
sure what. For instance, what Class or Interface is being returned from the Session, and where do I configure it?
It would be nice if in 2 paragraphs and an example, someone could
summarize how this is works - I haven't found anything like it.
Thanks! Merci! Danke! Gracias!
Martin
|