diff options
author | Matthias Andreas Benkard <code@mail.matthias.benkard.de> | 2023-12-02 13:38:02 +0100 |
---|---|---|
committer | Matthias Andreas Benkard <code@mail.matthias.benkard.de> | 2023-12-02 13:38:02 +0100 |
commit | d632fb0c673c9fe0647bdf27161f32cb0085a431 (patch) | |
tree | dd4fcca8e5f348389c98e153b01be379df82fae2 /src | |
parent | 11a3922ec6aae6c806eafddc37f93a8e83a5974a (diff) |
Simplify POM, add more precise JPA annotations.
Change-Id: I2ad299c90d578c2151b2f0b0394d50d3dab3d24f
Diffstat (limited to 'src')
-rw-r--r-- | src/main/java/eu/mulk/mulkcms2/benki/users/UserRolePK.java | 9 | ||||
-rw-r--r-- | src/main/resources/META-INF/beans.xml | 5 | ||||
-rw-r--r-- | src/main/resources/hypersistence-utils.properties (renamed from src/main/resources/hibernate-types.properties) | 0 |
3 files changed, 10 insertions, 4 deletions
diff --git a/src/main/java/eu/mulk/mulkcms2/benki/users/UserRolePK.java b/src/main/java/eu/mulk/mulkcms2/benki/users/UserRolePK.java index b84e02b..c424617 100644 --- a/src/main/java/eu/mulk/mulkcms2/benki/users/UserRolePK.java +++ b/src/main/java/eu/mulk/mulkcms2/benki/users/UserRolePK.java @@ -6,11 +6,14 @@ import java.io.Serializable; public class UserRolePK implements Serializable { + @Column(name = "user", nullable = false) + @Id private int userId; - private int roleId; - @Column(name = "user", nullable = false) + @Column(name = "role", nullable = false) @Id + private int roleId; + public int getUserId() { return userId; } @@ -19,8 +22,6 @@ public class UserRolePK implements Serializable { this.userId = userId; } - @Column(name = "role", nullable = false) - @Id public int getRoleId() { return roleId; } diff --git a/src/main/resources/META-INF/beans.xml b/src/main/resources/META-INF/beans.xml new file mode 100644 index 0000000..6bb944c --- /dev/null +++ b/src/main/resources/META-INF/beans.xml @@ -0,0 +1,5 @@ +<?xml version="1.0" encoding="UTF-8"?> +<beans xmlns="https://jakarta.ee/xml/ns/jakartaee" + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:schemaLocation="https://jakarta.ee/xml/ns/jakartaee https://jakarta.ee/xml/ns/jakartaee/beans_4_0.xsd"> +</beans>
\ No newline at end of file diff --git a/src/main/resources/hibernate-types.properties b/src/main/resources/hypersistence-utils.properties index ce36a3b..ce36a3b 100644 --- a/src/main/resources/hibernate-types.properties +++ b/src/main/resources/hypersistence-utils.properties |