@MappedSuperclass使用EclipseLink和多个jar进行静态编织 [英] @MappedSuperclass static weaving with EclipseLink and multiple jars

查看:122
本文介绍了@MappedSuperclass使用EclipseLink和多个jar进行静态编织的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的实体对象分散在多个罐中.
在jar A中,我有一个基类名称MyBase,该基类名称用@MappedSuperclass注释.
在jar B中,有一个实体类,它从MyBase派生.
问题在于,因为编织是在jar文件的上下文中完成的(我正在使用Maven插件),所以未检测到基类(MyBase)(尽管应该这样做).
如果我将派生类从jar B移到A,那么编织过程也将处理基数.
由于我从事的是大型项目,因此以模块化方式进行开发至关重要.
EclipseLink不支持这种方法吗?

My entities objects are scattered in multiple jars.
In jar A I have a base class name MyBase which is annotated with @MappedSuperclass.
In jar B there is an entity class which derives from MyBase.
The problem is that because the weaving is done in the context of the jar file (I'm using the maven plugin) the base class (MyBase) isn't instrumented (although it should).
If I move the derived class from jar B to A then the weaving process will handle the base as well.
Since I'm working on a large project it is critical for me to develop in a modular way.
Doesn't EclipseLink support such methodology?

推荐答案

我发现要克服此限制的唯一方法是将临时实体类添加到定义了@MappedSuperclass基类的jar中,并在编织后将其删除程序.
悲伤,但真实;-)

The only way I found to override this limitation is to add a temporary entity class to the jar where the @MappedSuperclass base class is defined and remove it after the weaving procedure.
Sad, but true ;-)

这篇关于@MappedSuperclass使用EclipseLink和多个jar进行静态编织的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆