Bug #50: hbm missing not-null for many-to-one association
- Estimated Hours: 2
- State: New
- Assigned To:
lars.hoidahl
- Closed: No
Bug Details:
I have class Scan that has a 1-to-1 uni-directional association to ScanDefinition and the following is defined:
<many-to-one name=‘scanDefinition’ class=‘com.pinkwater.trader.server.ScanDefinition’ not-null=‘true’ cascade=‘save-update’ foreign-key=‘fk_scan_scan_definition_id’ unique=‘true’>
<column name=‘scan_definition_id’/>
</many-to-one>
If the association was not mandatory then the above is correct but every Scan object MUST have a ScanDefinition object which is why I defined the inverse multiplicity as 1 rather than None. So I expected the following to be generated:
<many-to-one name=‘scanDefinition’ class=‘com.pinkwater.trader.server.ScanDefinition’ not-null=‘true’ cascade=‘save-update’ foreign-key=‘fk_scan_scan_definition_id’ unique=‘true’>
<column name=‘scan_definition_id’ not-null=‘true’/>
</many-to-one>
See forum
Bug has no hours added
You do not have sufficient permissions to add hours to this bug.
Entry has no comments
You do not have sufficient permissions to comment
Entry has no source control commits
Iteration: 2.0.9 → 2.0.10 - hbm.cfg fixes
Iteration: Bug fixes → 2.0.9
View full history
Bug #50: hbm missing not-null for many-to-one association