I have a existing database.Need to add new not null column with default value.The same can be done in hibernate 4.3 using ValueGenerator interface.But my project has hibernate 3.6 which does not provide this functionality.Is there any way to do this using hibernate.
You can acchive with @Column with nullable attribute e.g:
@Column(nullable = false)
private String name = "Jhon Doe";
Also a little bit of a hack using the columnDefinition property of the @Column annotation, for example:
@Column(columnDefinition="double precision default '96'")
private Double grolsh;