2.0.11 - hbm.cfg fixes

Iteration has -1 years, -5 months, -1 weeks, -4 days to go. It starts from Fri 14 May, 2010 to Mon 30 Aug, 2010.

Iteration Details

Stories: 0    Tasks: 0   Bugs: 6 (6 remaining)   Estimated Hours: 16

Type Id Description Hours Assigned To Completed  
Total Added Remaining
#4
Delete attribute with TagSymbol

I had a class Value with an attribute value that had a comment Tag symbol in ClassDiagram 1.
I deleted the value attribute in another diagram.
Then I opened ClassDiagram 1 and got this exception:
java.lang.IllegalArgumentException: value is not a member of Value
at com.objectgen.classes.ClassSymbol$AttributePos.<init>(ClassSymbol.java:1665)
at com.objectgen.classes.TagSymbol.attachLineTo(TagSymbol.java:193)
at com.objectgen.classes.CommentSymbol.start(CommentSymbol.java:87)
at com.objectgen.classes.TagSymbol.start(TagSymbol.java:101)
at com.objectgen.graphics.Diagram.startAllSymbols(Diagram.java:944)
at com.objectgen.graphics.Diagram.paintSymbols(Diagram.java:903)
at com.objectgen.graphics.swt.SwtDiagramCanvas.paintDoubleBuffered(SwtDiagramCanvas.java:458)
at com.objectgen.graphics.swt.SwtDiagramCanvas.paintControl(SwtDiagramCanvas.java:403)

2 0 2

lars.hoidahl picture lars.hoidahl


0 %
#40
Generate not-null in hbm.xml for 1 multiplicity

I tried declaring an attribute in a Persistent class as mandatory such as:

+Integer[1] pageNumber

In the hibernate mapping file I didn’t see any change. I was hoping the property for that attribute would use the not-null=“true” modifier such as:

<property name=‘pageNumber’ type=‘integer’ column=‘page_number’ not-null=“true”>
</property>

See forum

3 0 3

lars.hoidahl picture lars.hoidahl


0 %
#41
Hibernate Time type not supported correctly

In the Hibernate documentation it states that java.util.Date or java.sql.Time can be used for the TIME type but it seems the preferable class for me is not correctly supported by HiberObjects. When I define an attribute of type Time it is declaring the following in the mapping file:

<many-to-one name=‘marketOpenTime’ class=‘Time’ foreign-key=‘fk_configuration_market_open_time_id’>
<column name=‘market_open_time_id’/>
</many-to-one>

when I expected:

<property name=‘marketOpenTime’ type=‘time’ column=‘market_open_time’>
</property>

https://www.hibernate.org/hib_docs/v3/api/org/hibernate/type/TimeType.html

See forum

Try to use the special HiberObjects type TIME. (See help pages: Date, Time and Timestamp)

3 0 3

lars.hoidahl picture lars.hoidahl


0 %
#50
hbm missing not-null for many-to-one association

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

2 0 2

lars.hoidahl picture lars.hoidahl


0 %
#69
Tags do not remember their position when saved

I have a class diagram where I have various hibernate tags entered and I have moved those tags from their default position to a location that avoids overlapping with something else in the diagram. Unfortunately when I save the diagram, close Eclipse, re-open eclipse, then that diagram doesn’t remember the position of my saved tags and I again have the problem of tags overlapping each other or other elements in the diagram which makes my diagram hard to read.

This is occurring for @hibernate tags on attributes. Doesn’t seem to be a problem for @hibernate tags on the class' name.

See forum

4 0 4

lars.hoidahl picture lars.hoidahl


0 %
#72
TIMESTAMP, TIME, and DATE special types break auto interface

I have “Generate interfaces” turned on for persistent classes.

When I add attributes with the special types TIMESTAMP, TIME, and DATE, the code generated for the class includes java.util.Date as expected. However, in the auto-generated interfaces the special types remain unchanged. For example, in a <<Persistent>> class I have:

+TIMESTAMP executionTimestamp

Here’s the generated code in the class:
   public java.util.Date getExecutionTimestamp() {
      return this.executionTimestamp;
   }
   public void setExecutionTimestamp(java.util.Date executionTimestamp) {
      this.executionTimestamp = executionTimestamp;
   }

And here’s the generated code in the interface:

   TIMESTAMP getExecutionTimestamp();
   void setExecutionTimestamp(TIMESTAMP executionTimestamp);

See forum

2 0 2

lars.hoidahl picture lars.hoidahl


0 %

Iteration history

1 year ago
lars.hoidahl picture
lars.hoidahl updated Iteration 2.0.11 - hbm.cfg fixes

End: Mon May 31 00:00:00 BST 2010Tue Aug 31 00:00:00 BST 2010

lars.hoidahl picture
lars.hoidahl updated Iteration 2.0.11 - hbm.cfg fixes

Name: 2.0.12 - hbm.cfg fixes2.0.11 - hbm.cfg fixes

lars.hoidahl picture
lars.hoidahl updated Iteration 2.0.11 - hbm.cfg fixes

Start: Mon Apr 26 00:00:00 BST 2010Sat May 15 00:00:00 BST 2010

Name: 2.0.10 - hbm.cfg fixes2.0.12 - hbm.cfg fixes

End: Fri Apr 30 00:00:00 BST 2010Mon May 31 00:00:00 BST 2010

lars.hoidahl picture
lars.hoidahl updated Iteration 2.0.11 - hbm.cfg fixes

Name: 2.0.10 hbm.cfg fixes2.0.10 - hbm.cfg fixes

lars.hoidahl picture
lars.hoidahl created Iteration 2.0.11 - hbm.cfg fixes