From 8a0fbbd35c13054a947ea0d27ca117542bc452b9 Mon Sep 17 00:00:00 2001 From: Vitaly Takmazov Date: Fri, 18 May 2018 15:33:38 +0300 Subject: JPA WIP --- .../data/entities/BaseUserPropertyEntity.java | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 juick-server/src/main/java/com/juick/service/data/entities/BaseUserPropertyEntity.java (limited to 'juick-server/src/main/java/com/juick/service/data/entities/BaseUserPropertyEntity.java') diff --git a/juick-server/src/main/java/com/juick/service/data/entities/BaseUserPropertyEntity.java b/juick-server/src/main/java/com/juick/service/data/entities/BaseUserPropertyEntity.java new file mode 100644 index 00000000..a5b1909d --- /dev/null +++ b/juick-server/src/main/java/com/juick/service/data/entities/BaseUserPropertyEntity.java @@ -0,0 +1,20 @@ +package com.juick.service.data.entities; + +import javax.persistence.FetchType; +import javax.persistence.JoinColumn; +import javax.persistence.ManyToOne; +import javax.persistence.MappedSuperclass; + +@MappedSuperclass +public class BaseUserPropertyEntity { + @ManyToOne(fetch = FetchType.LAZY) + @JoinColumn(name = "user_id") + private UserEntity user; + public UserEntity getUser() { + return user; + } + + public void setUser(UserEntity user) { + this.user = user; + } +} -- cgit v1.2.3