[
http://opensource.atlassian.com/projects/hibernate/browse/HHH-5556?page=c...
]
Steve Ebersole closed HHH-5556.
-------------------------------
Resolution: Rejected
This works exactly as you want if there is no @Column annotation present. And,
unfortunately, if there is a @Column annotation present there is no way for us to know
whether it specified nullable explicitly since it is a primitive value. So when reading
it, @Column(name="abc") and @Column(name="abc, nullable=true) look exactly
the same
Allow primitive properties to default to non-nullable in annotations
--------------------------------------------------------------------
Key: HHH-5556
URL:
http://opensource.atlassian.com/projects/hibernate/browse/HHH-5556
Project: Hibernate Core
Issue Type: New Feature
Components: annotations
Affects Versions: 3.5.0-Final
Environment: Hibernate 3.3.1, PostgreSQL 8.3
Reporter: Daniel Migowski
We have an entity attribute like this:
@Column(updateble=false)
double quantityInInvoice;
This column is considered nullable in the Hibernate meta data because the @Column
annotation contains another attribute named "nullable" which defaults to true.
I don't know if this is an specification error but for primitive datatypes the column
should never be nullable IMHO. We found this out because we modified Hibernate locally to
create and update the NOT NULL contraints on tables in the database.
Workaround: Set nullable=false explicitely in the @Column 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....
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira