-
Notifications
You must be signed in to change notification settings - Fork 49
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
7f0f842
commit 75b44bf
Showing
8 changed files
with
104 additions
and
17 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
30 changes: 30 additions & 0 deletions
30
core/src/test/java/com/cosium/spring/data/jpa/entity/graph/sample/Tracking.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,30 @@ | ||
package com.cosium.spring.data.jpa.entity.graph.sample; | ||
|
||
import jakarta.persistence.Embeddable; | ||
import jakarta.persistence.FetchType; | ||
import jakarta.persistence.ManyToOne; | ||
|
||
@Embeddable | ||
public class Tracking { | ||
@ManyToOne(fetch = FetchType.LAZY) | ||
private User modifier; | ||
|
||
@ManyToOne(fetch = FetchType.LAZY) | ||
private User creator; | ||
|
||
public User getModifier() { | ||
return modifier; | ||
} | ||
|
||
public void setModifier(User modifier) { | ||
this.modifier = modifier; | ||
} | ||
|
||
public User getCreator() { | ||
return creator; | ||
} | ||
|
||
public void setCreator(User creator) { | ||
this.creator = creator; | ||
} | ||
} |
34 changes: 34 additions & 0 deletions
34
core/src/test/java/com/cosium/spring/data/jpa/entity/graph/sample/User.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,34 @@ | ||
package com.cosium.spring.data.jpa.entity.graph.sample; | ||
|
||
import jakarta.persistence.Access; | ||
import jakarta.persistence.AccessType; | ||
import jakarta.persistence.Entity; | ||
import jakarta.persistence.GeneratedValue; | ||
import jakarta.persistence.GenerationType; | ||
import jakarta.persistence.Id; | ||
|
||
@Entity | ||
public class User { | ||
@Id | ||
@GeneratedValue(strategy = GenerationType.IDENTITY) | ||
@Access(value = AccessType.PROPERTY) | ||
private long id = 0; | ||
|
||
private String login; | ||
|
||
public long getId() { | ||
return id; | ||
} | ||
|
||
public void setId(long id) { | ||
this.id = id; | ||
} | ||
|
||
public String getLogin() { | ||
return login; | ||
} | ||
|
||
public void setLogin(String login) { | ||
this.login = login; | ||
} | ||
} |
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
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