Guest User

Untitled

a guest
Apr 12th, 2016
53
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.65 KB | None | 0 0
  1. class User {
  2.  
  3. /**
  4. * @OneToMany(targetEntity="AppBundleEntityUserDataAttribute", mappedBy="user", cascade={"persist", "remove"})
  5. * @var DoctrineCommonCollectionsCollection
  6. */
  7. private $customAttributes;
  8. }
  9.  
  10. class UserDataAttribute
  11. {
  12. /**
  13. * @ManyToOne(targetEntity="AppBundleEntityUser", inversedBy="customAttributes")
  14. * @JoinColumn(name="user_id", referencedColumnName="id")
  15. */
  16. private $user;
  17. }
  18.  
  19. INSERT INTO user_data_attr (user_id) VALUES (null);
  20.  
  21. INSERT INTO user_data_attr (userId) VALUES (2323 (the actual value)));
  22.  
  23. INSERT INTO user_data_attr (user_id) VALUES (2323);
Advertisement
Add Comment
Please, Sign In to add comment