【发布时间】:2018-11-20 11:40:58
【问题描述】:
//generic repo
public interface MyGenericRepo extends JpaRepository<GenericEntity,Integer> { }
//entity
class Place extends GenericEntity {
private Event event;
}
//entity
class Event extends GenericEntity{ }
//entity
class Offer extends GenericEntity
{
private Place place;
}
//entity
class User extends GenericEntity {
private Place place;
}
我应该在 GenericEntity 中使用什么以及如何创建 ModelManager 来保存和加载实体
【问题讨论】:
-
是的,类似,但是请教如何创建服务
标签: java spring-data-jpa