[
http://jira.codehaus.org/browse/MHIBERNATE-113?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
joan ramon closed MHIBERNATE-113.
---------------------------------
Resolution: Fixed
Fix Version/s: 2.2
Hi,
it seems that it's not possible to create a ddl scripts with entities in
different persitence-unit.
So I have add my entities of ProjectB to my hibernate.cfg.xml to simulate them
in my ProjectA persistence-unit, and it works.
Regards,
Joan
> Cna't find entities in an external dependency
> ---------------------------------------------
>
> Key: MHIBERNATE-113
> URL: http://jira.codehaus.org/browse/MHIBERNATE-113
> Project: Maven 2.x Hibernate Plugin
> Issue Type: Bug
> Components: hbm2ddl
> Affects Versions: 2.2
> Reporter: joan ramon
> Assignee: Johann Reyes
> Fix For: 2.2
>
>
> Hello,
> I have to eclipse projects which both contains entities.
> ProjectA with the entityA and a projectB with the entityB.
> The projectA has no dependency, so hbm2ddl is running prefectly.
> But my entityB has an attribute of type entityA, so my projectB pom.xml
> contains a dependency to projectA.
> When launch hbm2ddl on my projectB, I have the error :
> Exception in thread "main" org.hibernate.AnnotationException: @OneToOne or
> @ManyToOne on entityB.fieldB references an unknown entity: entityA
> So do you have an idea why it's failing?
> Is it possible to create a DDL with an entity depending on an external entity
> ?
> Here is the content of my projectB pom.xml
> <plugin>
> <groupId>org.codehaus.mojo</groupId>
> <artifactId>hibernate3-maven-plugin</artifactId>
> <version>2.2</version>
> <configuration>
> <components>
> <component>
> <name>hbm2ddl</name>
>
> <implementation>annotationconfiguration</implementation>
> </component>
> <component>
> <name>hbm2doc</name>
>
> <implementation>annotationconfiguration</implementation>
> </component>
> </components>
> <componentProperties>
>
> <configurationfile>../wlp-iap-config/src/main/resources/hibernate-mysql-doc.cfg.xml
> </configurationfile>
> <persistenceunit>Default</persistenceunit>
>
> <outputfilename>../../../src/main/scripts/${project.name}-ddl.sql</outputfilename>
> <drop>true</drop>
> <create>true</create>
> <export>false</export>
> <format>true</format>
> <jdk5>true</jdk5>
> <detectmanytomany>true</detectmanytomany>
> <scan-classes>true</scan-classes>
> </componentProperties>
> </configuration>
> </plugin>
> Regards,
> Joan
--
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