Created
April 26, 2011 15:08
-
-
Save emmanuelbernard/942450 to your computer and use it in GitHub Desktop.
HibernateMetadata.java
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
MetadataSources sources = new MetadataSources(...) | |
... | |
.addAnnotatedClasses( Item.class ); | |
.buildMetadata(); | |
MetadataSources sources = new MetadataSources(...) | |
... | |
.addAnnotatedClasses( Item.class ); | |
.usingContext() | |
.setNamingStrategy( new MyNamingStrategy() ) | |
.buildMetadata(); |
Gail, this last one was just an illustration. It is specifically something I do not want.
Btw, as I sent out the dev ml, John pointed out a typo in my original email that I think is causing some confusion...
buildMetadata() is meant to return Metadata, not MetadataSources:
Metadata metadata = new MetadataSources(...)
...
.addAnnotatedClasses( Item.class )
.buildMetadata();
Metadata metadata = new MetadataSources(...)
...
.addAnnotatedClasses( Item.class )
.usingContext()
.setNamingStrategy( new MyNamingStrategy() )
.buildMetadata();
hmm, apparently the markdown stuff does not work out very well...
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
from steve's email: