HHH-7717 Wrapped "SYS_USER" column names into "`SYS_USER`" as they can
be reserved in some dialects which would cause a test failure.
This commit is contained in:
parent
eb4b4ba0d2
commit
f63352b0f7
|
@ -1,43 +1,43 @@
|
||||||
package org.hibernate.test.annotations.join;
|
package org.hibernate.test.annotations.join;
|
||||||
import java.util.Collection;
|
import java.util.Collection;
|
||||||
import javax.persistence.Column;
|
import javax.persistence.Column;
|
||||||
import javax.persistence.Entity;
|
import javax.persistence.Entity;
|
||||||
import javax.persistence.FetchType;
|
import javax.persistence.FetchType;
|
||||||
import javax.persistence.GeneratedValue;
|
import javax.persistence.GeneratedValue;
|
||||||
import javax.persistence.Id;
|
import javax.persistence.Id;
|
||||||
import javax.persistence.JoinColumn;
|
import javax.persistence.JoinColumn;
|
||||||
import javax.persistence.JoinTable;
|
import javax.persistence.JoinTable;
|
||||||
import javax.persistence.ManyToMany;
|
import javax.persistence.ManyToMany;
|
||||||
import javax.persistence.Table;
|
import javax.persistence.Table;
|
||||||
|
|
||||||
@Entity( name = "sys_user" )
|
@Entity( name = "sys_user" )
|
||||||
@Table( name = "SYS_USER" )
|
@Table( name = "`SYS_USER`" )
|
||||||
public class SysUserOrm {
|
public class SysUserOrm {
|
||||||
|
|
||||||
private long userid;
|
private long userid;
|
||||||
|
|
||||||
private Collection<SysGroupsOrm> groups;
|
private Collection<SysGroupsOrm> groups;
|
||||||
|
|
||||||
@Id
|
@Id
|
||||||
@GeneratedValue
|
@GeneratedValue
|
||||||
@Column( name = "`auid`" )
|
@Column( name = "`auid`" )
|
||||||
public long getUserid() {
|
public long getUserid() {
|
||||||
return userid;
|
return userid;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setUserid( long userid ) {
|
public void setUserid( long userid ) {
|
||||||
this.userid = userid;
|
this.userid = userid;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ManyToMany( fetch = FetchType.LAZY )
|
@ManyToMany( fetch = FetchType.LAZY )
|
||||||
@JoinTable( name = "SYS_GROUPS_USERS",
|
@JoinTable( name = "SYS_GROUPS_USERS",
|
||||||
joinColumns = @JoinColumn( name = "USERID", referencedColumnName = "`auid`" ),
|
joinColumns = @JoinColumn( name = "USERID", referencedColumnName = "`auid`" ),
|
||||||
inverseJoinColumns = @JoinColumn( name = "GROUPID", referencedColumnName = "GROUPID" ) )
|
inverseJoinColumns = @JoinColumn( name = "GROUPID", referencedColumnName = "GROUPID" ) )
|
||||||
public Collection<SysGroupsOrm> getGroups() {
|
public Collection<SysGroupsOrm> getGroups() {
|
||||||
return groups;
|
return groups;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setGroups( Collection<SysGroupsOrm> groups ) {
|
public void setGroups( Collection<SysGroupsOrm> groups ) {
|
||||||
this.groups = groups;
|
this.groups = groups;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue