daily pastebin goal
52%
SHARE
TWEET

Untitled

a guest Oct 13th, 2017 57 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. @Entity
  2. @Table(name = "users")
  3. data class User(
  4.         @Id @GeneratedValue val id: Long? = null,
  5.         var name: String = "",
  6.         @OneToOne var profile: Profile? = null
  7. )
  8.    
  9. @Entity
  10. @Table(name = "profile")
  11. data class Profile (
  12.         @Id @GeneratedValue val id: Long? = null,
  13.         @OneToOne var user: User? = null,
  14.         @OneToMany var subscribers: Set<User>? = null,
  15.         @OneToMany var subscriptions: Set<User>? = null,
  16. )
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top