有没有办法可以在 Netbeans 中自动生成 orm.xml 文件,即使我以后可以修改它。我正在使用 eclipselink JPA 2.1 ,它在建设时不断给我这个警告
warning: Supported source version 'RELEASE_6' from annotation processor 'org.eclipse.persistence.internal.jpa.modelgen.CanonicalModelProcessor' less than -source '1.7'
Note: Creating non-static metadata factory ...
Note: Found Option : eclipselink.canonicalmodel.use_static_factory, with value: false
Note: Optional file was not found: META-INF/orm.xml continuing with generation.
Note: Optional file was not found: META-INF/eclipselink-orm.xml continuing with generation.
Note: Found Option : eclipselink.canonicalmodel.use_static_factory, with value: false
Note: Optional file was not found: META-INF/orm.xml continuing with generation.
Note: Optional file was not found: META-INF/eclipselink-orm.xml continuing with generation.
warning: The following options were not recognized by any processor: '[eclipselink.canonicalmodel.use_static_factory]'
Note: C:\Users\USER\Documents\NetBeansProjects\payroll\src\dcl\payroll\GUI\Login.java uses or overrides a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
Note: Some input files use unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.
1 warning
答案 0 :(得分:0)
警告只是告诉您,如果您使用orm.xml来定义映射,则找不到它。如果你在那里放置一个,你仍然会收到消息,告诉你一个人被发现。这会在日志中发出通知,以帮助指出在何处开始查看应用程序中是否出现意外情况 - 例如使用了错误的orm.xml版本或者出现了意外打包和拾取的版本,这似乎是开发中的常见问题。