[ 
http://jira.codehaus.org/browse/MHIBERNATE-71?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_122316
 ] 

Geoffrey De Smet commented on MHIBERNATE-71:
--------------------------------------------

Do you verify in the test that it's not just ignoring the namingstrategy 
property?

I've tried with the latest release of hibernate3-maven-plugin, both with the 
default tools jar, as with overriding the latest (3.2.0.ga).
In both cases jpaconfiguration just ignores my custom naming strategy and uses 
the hibernate default (so it generates a wrong sql).
Even if I use a unexisting naming strategy it doesn't fail-fast.

However, annotationsconfiguration does use the naming strategy, and shows a log 
message about it
(and fail-fast if it's unexisting).
annotationsconfiguration doesn't use META-INF/persistence.xml, so that brings 
in a bunch of in sync issues along for me.

Btw, I also tried <hibernate.ejb.naming_strategy>MyNamingStrategy</...> but 
that just got ignored too :)

Thanks for a great plugin though.

> jpaconfiguration does not support namingstrategy
> ------------------------------------------------
>
>                 Key: MHIBERNATE-71
>                 URL: http://jira.codehaus.org/browse/MHIBERNATE-71
>             Project: Maven 2.x Hibernate Plugin
>          Issue Type: Improvement
>          Components: hbm2ddl
>    Affects Versions: 2.0
>            Reporter: Geoffrey De Smet
>            Assignee: Johann Reyes
>            Priority: Critical
>             Fix For: 2.1
>
>
> For annotationconfiguration it works out the box, because hibernate-tools 
> supports that kind of property there.
> For jpaconfiguration it doesn't.
> The JPAComponentConfiguration class should include something like this:
> String namingstrategy = getExporterMojo().getComponentProperty( 
> "namingstrategy " );
> if (namingstrategy != null) {
>   ejb3cfg.setNamingStrategy(Class.forName(namingstrategy).newInstance());
> }

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: 
http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

---------------------------------------------------------------------
To unsubscribe from this list please visit:

    http://xircles.codehaus.org/manage_email

Reply via email to