Skip to content

Latest commit

 

History

History
32 lines (23 loc) · 2.1 KB

README.md

File metadata and controls

32 lines (23 loc) · 2.1 KB

JFactory JPA DataRepository

CircleCI coveralls Lost commit Maven Central License Codacy Badge Maintainability Code Climate issues Code Climate maintainability (percentage)

安装

通过Gradle添加依赖

    implementation 'com.github.leeonky:jfactory-repo-jpa:0.1.0'

使用

EntityManagerFactory entityManagerFactory
        JFactory jfactory=new JFactory(new JPADataRepository(entityManagerFactory));

// jfactory.create(xxx);

注意

  • 考虑到关联表和外键问题,JPADataRepository::clear方法仅调用EntityManager::clear()清除缓存,不会清除数据库数据,需要测试代码额外添加清理数据逻辑。