-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
#8 - Create AnnotationUsage for id-class
- Loading branch information
Showing
8 changed files
with
151 additions
and
15 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
18 changes: 18 additions & 0 deletions
18
hibernate-models-orm/src/test/java/org/hibernate/models/orm/xml/dynamic/Employee.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
/* | ||
* Hibernate, Relational Persistence for Idiomatic Java | ||
* | ||
* SPDX-License-Identifier: Apache-2.0 | ||
* Copyright: Red Hat Inc. and Hibernate Authors | ||
*/ | ||
package org.hibernate.models.orm.xml.dynamic; | ||
|
||
import jakarta.persistence.Entity; | ||
import jakarta.persistence.Id; | ||
|
||
@Entity | ||
public class Employee { | ||
@Id | ||
private String name; | ||
@Id | ||
private int number; | ||
} |
14 changes: 14 additions & 0 deletions
14
hibernate-models-orm/src/test/java/org/hibernate/models/orm/xml/dynamic/EmployeePK.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
/* | ||
* Hibernate, Relational Persistence for Idiomatic Java | ||
* | ||
* SPDX-License-Identifier: Apache-2.0 | ||
* Copyright: Red Hat Inc. and Hibernate Authors | ||
*/ | ||
package org.hibernate.models.orm.xml.dynamic; | ||
|
||
import jakarta.persistence.Id; | ||
|
||
public class EmployeePK { | ||
private String name; | ||
private int number; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
17 changes: 17 additions & 0 deletions
17
hibernate-models-orm/src/test/resources/mappings/dynamic/dynamic-id-class.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
<!-- | ||
~ Hibernate, Relational Persistence for Idiomatic Java | ||
~ | ||
~ SPDX-License-Identifier: Apache-2.0 | ||
~ Copyright: Red Hat Inc. and Hibernate Authors | ||
--> | ||
<entity-mappings xmlns="http://www.hibernate.org/xsd/orm/mapping" | ||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | ||
version="3.1"> | ||
<entity class="org.hibernate.models.orm.xml.dynamic.Employee" access="FIELD"> | ||
<id-class class="org.hibernate.models.orm.xml.dynamic.EmployeePK"/> | ||
<attributes> | ||
<id name="name"/> | ||
<id name="number"/> | ||
</attributes> | ||
</entity> | ||
</entity-mappings> |