mirror of
https://github.com/Athou/commafeed.git
synced 2026-03-21 21:37:29 +00:00
table generator
This commit is contained in:
@@ -6,13 +6,15 @@ import javax.persistence.GeneratedValue;
|
|||||||
import javax.persistence.GenerationType;
|
import javax.persistence.GenerationType;
|
||||||
import javax.persistence.Id;
|
import javax.persistence.Id;
|
||||||
import javax.persistence.MappedSuperclass;
|
import javax.persistence.MappedSuperclass;
|
||||||
|
import javax.persistence.TableGenerator;
|
||||||
|
|
||||||
@SuppressWarnings("serial")
|
@SuppressWarnings("serial")
|
||||||
@MappedSuperclass
|
@MappedSuperclass
|
||||||
public abstract class AbstractModel implements Serializable {
|
public abstract class AbstractModel implements Serializable {
|
||||||
|
|
||||||
@Id
|
@Id
|
||||||
@GeneratedValue(strategy = GenerationType.AUTO)
|
@GeneratedValue(strategy = GenerationType.TABLE, generator = "gen")
|
||||||
|
@TableGenerator(name = "gen", allocationSize = 1000)
|
||||||
private Long id;
|
private Long id;
|
||||||
|
|
||||||
public Long getId() {
|
public Long getId() {
|
||||||
|
|||||||
Reference in New Issue
Block a user