persist module is missing support for finders in concrete classes
- 主要语言
- Java
- 星标
- 12.7k
- 派生
- 1.7k
- 平均合并
- 11 分钟
- 30 天内合并 PR
- 2
描述
_From [basg81](https://code.google.com/u/basg81@gmail.com/) on September 15, 2011 17:26:34_
I've switched from warp-persist to guice-persist and see that for some reason finders on concrete classes are no longer working.
I couldn't find any information on the wiki, or through google on this topic. There must be a reason for it to be missing?
Anyway, it was easy enough to add. I'll add my code here for documentation purposes, should others have the same
(1) Create class PublicJpaFinderProxy extends JpaFinderProxy (in the same package)
(2) In the place where you install the JpaPersistModule, add:
// Install finder interceptor
Provider<EntityManager> provider = getProvider( EntityManager.class );
PublicJpaFinderProxy proxy = new PublicJpaFinderProxy( provider );
bindInterceptor( Matchers.any(), Matchers.annotatedWith( Finder.class ), proxy );
... which will behave exactly the same as the concrete finder support in warp-persist.
_Original issue: http://code.google.com/p/google-guice/issues/detail?id=653_
贡献指南
调研方向
先阅读 JpaFinderProxy 和 JpaPersistModule,然后跟踪 EntityManager 和 Finder 注解如何用于 finder 拦截。使用具体类上的 finder 重现报告的失败,并确认具体类的 finder 的行为与现有支持一致。
由索引模型根据 Issue 内容生成。
评估
- 技术栈
- java
- 领域
- databases
- Issue 类型
- 功能
- 难度
- 3/5
- 预计耗时
- 1-2 天
- 活跃度
- 停滞
- 描述清晰度
- 基本清楚
- 新手友好度
- 35/100