Menu

Best Practices

Gord Thompson

Protection against column names with spaces, keywords, etc.

In hibernate.cfg.xml use the "globally_quoted_identifiers" property, e.g.,

<property name="dialect">net.ucanaccess.hibernate.dialect.UCanAccessDialect</property>
<property name="globally_quoted_identifiers">true</property>

 

MEMO fields

@Lob
private String comments;

 

money fields

// auto-created columns will be DECIMAL() instead of CURRENCY
@Column(precision = 19, scale = 4)  // required, otherwise defaults to (19,2)
private BigDecimal fee;

 


Related

Wiki: Home

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.