[hibernate-issues] [Hibernate-JIRA] Commented: (ANN-604) There is no annotation to specify default value for a column

Jean-Baptiste BRIAUD (JIRA) noreply at atlassian.com
Thu Jun 11 10:16:15 EDT 2009


    [ http://opensource.atlassian.com/projects/hibernate/browse/ANN-604?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=33387#action_33387 ] 

Jean-Baptiste BRIAUD commented on ANN-604:
------------------------------------------

The main problem is when you use Hibernate to propduce the database schema.
Then, the default value is not a constraint in the schema because no annotation allows you to specify it.
This is a blocker for me right now.

Also, as you start accessing the DB via other application than the one where Hibernate manage the persistance, the DB and not Java must be aware of this default value.
Again in that case, this is a blocker.

The workaround works only in one case : all access to the DB has to be done via the same Hibernate application, this could be done via Java declaration but this is not always the case.

This works in XML definition and this is the only real workaround but you have to like XML more than annotation ;-)

> 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