Hello All,
I have enum field in my class: (full source [1])
@Entity
@Table(name = "om_user")
public class User implements Serializable, IDataProviderEntity {
public enum Right {
Admin // access to Admin module
, Room // enter the room
, Dashboard // access the dashboard
, Login // login to Om internal DB
, Soap // use rest/soap calls
@ElementCollection(fetch = FetchType.EAGER)
@Column(name = "right")
@CollectionTable(name = "om_user_right", joinColumns = @JoinColumn(name =
"user_id"))
@Enumerated(EnumType.STRING)
private Set<Right> rights = new HashSet<User.Right>();
Today we get bug report [2] according "right" is reserved word in MSSql.
Can It be escaped somehow by OpenJPA or the only option is to change column
name? (we are using OpenJPA 2.3.0)
Please NOTE table has name om_user due to "user" is reserver in derby and
it also not being escaped :(
Thanks in advance
[1]
https://svn.apache.org/viewvc/openmeetings/branches/3.0.x/src/db/java/org/apache/openmeetings/db/entity/user/User.java?revision=1601669븧=markup
[2] https://issues.apache.org/jira/browse/OPENMEETINGS-1088
I have enum field in my class: (full source [1])
@Entity
@Table(name = "om_user")
public class User implements Serializable, IDataProviderEntity {
public enum Right {
Admin // access to Admin module
, Room // enter the room
, Dashboard // access the dashboard
, Login // login to Om internal DB
, Soap // use rest/soap calls
@ElementCollection(fetch = FetchType.EAGER)
@Column(name = "right")
@CollectionTable(name = "om_user_right", joinColumns = @JoinColumn(name =
"user_id"))
@Enumerated(EnumType.STRING)
private Set<Right> rights = new HashSet<User.Right>();
Today we get bug report [2] according "right" is reserved word in MSSql.
Can It be escaped somehow by OpenJPA or the only option is to change column
name? (we are using OpenJPA 2.3.0)
Please NOTE table has name om_user due to "user" is reserver in derby and
it also not being escaped :(
Thanks in advance
[1]
https://svn.apache.org/viewvc/openmeetings/branches/3.0.x/src/db/java/org/apache/openmeetings/db/entity/user/User.java?revision=1601669븧=markup
[2] https://issues.apache.org/jira/browse/OPENMEETINGS-1088