18
我有下划线的数据库字段。我在camelcase中有实体字段。我无法改变这些。Hibernate实体字段camelcase,数据库下划线
有没有什么,也许是一个类级别的注释我可以使用默认的实体列名注释到camelcase相当于?
例如,我有一个这样的实体:
@Entity
public class AuthorisationEntity {
@Column(name = "non_recoverable")
private BigDecimal nonRecoverable;
@Column(name = "supplier_recoverable")
private BigDecimal supplierRecoverable;
@Column(name = "refund_amount")
private BigDecimal refundAmount;
}
我的梦想是:
@Entity
@DatabaseIsUnderscoreAndThisAnnotationConvertsThemToCamelCaseByDefault
public class AuthorisationEntity {
private BigDecimal nonRecoverable;
private BigDecimal supplierRecoverable;
private BigDecimal refundAmount;
}
我找不到类'@ DatabaseIsUnderscoreAndThisAnnotationConvertsThemToCamelCaseByDefault' ...只是开玩笑,但我真的想把它粘贴到我的朋友。 :) – 2016-11-07 23:37:35