, MySQL @Column. , org.hibernate.dialect.MySQLDialect:
package org.yourproject;
import java.sql.Types;
import org.hibernate.dialect.MySQL5Dialect;
public class MySQL564PlusDialect extends MySQL5Dialect {
public MySQL564PlusDialect() {
super();
registerColumnType( Types.TIMESTAMP, 6, "datetime($l)" );
}
}
hibernate hibernate.dialect=org.yourproject.MySQL564PlusDialect (, , , , org.hibernate.dialect.MySQL5InnoDBDialect).
DATETIME @Column length:
@Basic(optional=false)
@Column(name="moment", length=3)
@Type(type="org.jadira.usertype.dateandtime.joda.PersistentDateTime")
public DateTime getMoment() {
...
DATETIME(3), . DATETIME ( ), . length 6, .
, (, org.hibernate.dialect.MySQLDialect , , - ), : length @Column .
P.S. precision @Column length, "datetime($l)" "datetime($p)" .