[hibernate-issues] [Hibernate-JIRA] Commented: (ANN-604) There is no annotation to specify default value for a column
nate moser (JIRA)
noreply at atlassian.com
Sun Aug 12 21:33:13 EDT 2007
[ http://opensource.atlassian.com/projects/hibernate/browse/ANN-604?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_27802 ]
nate moser commented on ANN-604:
--------------------------------
Rather than mucking around at the db level, I was able to workaround this shortcoming with a class variable of
private Boolean active = false;
instead of
private Boolean active;
where I have
@Column(name = "active", nullable = false)
public Boolean getActive()
{
return active;
}
Not sure if this would apply equally to all database flavors; I'm using MySQL 5.0.
> There is no annotation to specify default value for a column
> ------------------------------------------------------------
>
> Key: ANN-604
> URL: http://opensource.atlassian.com/projects/hibernate/browse/ANN-604
> Project: Hibernate Annotations
> Issue Type: New Feature
> Components: binder
> Affects Versions: 3.3.0.ga
> Reporter: Nicolae Bucalaete
> Priority: Minor
>
> In hibernate annotation you can't specify default value for a column.
> If you use xml files for mapping then you have this feature.
> I consider that this is a major problem with annotation.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
More information about the hibernate-issues
mailing list