开发者

How to create the metamodel for multiple persistence units using the same entity classes?

开发者 https://www.devze.com 2023-01-13 00:14 出处:网络
I get: diagnostic error: javax.annotation.processing.FilerException: Attempt to recreate a file for type

I get: diagnostic error: javax.annotation.processing.FilerException: Attempt to recreate a file for type

for:

                            <compilerArguments>-Aeclipselink.persistencexml=src/main/resources/META-INF/persistence.xml -Aeclipselink.persistenceunits=com.mysimpatico_MemoPlatform-database_nbm_1.0-SNAPSHOTPU,com.mysimpatico_inmemory_persistence_nbm_1.0-SNAPSHOTPU</compilerArguments开发者_如何学编程>

I'm trying to have both a temporary (in-memory) and a permanent db, with the same schema.

Please refer to this question.


Build the project with the previous configuration, i.e. with only one persistence unit to generate the metamodel classes. Then add the 2nd persitence unit to the persistence.xml and the following to the pom.xml:

<compilerArguments>  -Aeclipselink.persistenceunit=com.mysimpatico_MemoPlatform-database_nbm_1.0-SNAPSHOTPU </compilerArguments> (the name of 1 persistenceunit)
0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号