[hibernate-issues] [Hibernate-JIRA] Created: (HHH-3180) Handling of columns with database side default values
Heinz Huber (JIRA)
noreply at atlassian.com
Thu Mar 13 17:06:32 EDT 2008
Handling of columns with database side default values
-----------------------------------------------------
Key: HHH-3180
URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-3180
Project: Hibernate3
Issue Type: New Feature
Affects Versions: 3.2.6
Environment: Hibernate 3.2.6
Oracle 10i (should not matter)
Reporter: Heinz Huber
Attachments: generated-default.zip
Reload default columns after insert.
Effect: If a component is mapped with generated=default, it will be inserted (unless dynamic-insert and value == null) and then reloaded.
Example:
<class name="Verfueger" table="ELVFGR" dynamic-insert="true" dynamic-update="true" select-before-update="true" optimistic-lock="dirty"
rowid="rowid">
<composite-id name="nummer">
<key-many-to-one name="mandant" column="vfMand" />
<key-property name="anlagekennzeichen" column="vfAkzV" />
<key-property name="nummer" column="vfVfNr" length="6" />
</composite-id>
<property name="sms" column="vfSmsB" generated="default" />
</class>
If property sms has a value, it will be inserted.
If not, the default value will be set by the database.
In both cases, the value is reloaded after the insert.
Extent:
src/org/hibernate/hibernate-mapping-3.0.dtd
src/org/hibernate/mapping/PropertyGeneration.java
src/org/hibernate/tuple/PropertyFactory.java
src/org/hibernate/tuple/entity/EntityMetamodel.java
--
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