Issue Details (XML | Word | Printable)

Key: TORQUE-76
Type: Bug Bug
Status: Closed Closed
Resolution: Fixed
Priority: Major Major
Assignee: Thomas Vandahl
Reporter: Ronny Völker
Votes: 0
Watchers: 0
Operations

If you were logged in you would be able to see more operations.
Torque

broken combatibility to 3.2: incompatible types error when compiling BasePeer classes

Created: 12/Jan/07 04:25 PM   Updated: 06/Mar/07 09:06 AM
Return to search
Component/s: Generator
Affects Version/s: 3.3-RC1
Fix Version/s: 3.3

Time Tracking:
Not Specified

File Attachments:
  Size
Zip Archive torque-76-testcase.zip 2007-01-23 07:48 AM Ronny Völker 1.0 kB

Resolution Date: 03/Feb/07 09:09 PM


 Description  « Hide
When compiling Scarab with Torque3.3rc1 lots of incompatible types error are returned.
When compiling with Torque3.2 everything is compiled successfully.

The root cause are changes of torque/templates/trunk/src/templates/om/Peer.vm in r373352.
In this revisions some class casts have been removed which seem to be required in BasePeer classes, if inheritance and interfaces are used in the schema mapping.

Sample compilation output:
    [javac] C:\elaxy\svn\scarab_trunk\src\java\org\tigris\scarab\om\BaseIssuePeer.java:933: incompatible types
    [javac] found : org.tigris.scarab.om.Module
    [javac] required: org.tigris.scarab.om.ScarabModule
    [javac] ScarabModule temp_obj2 = temp_obj1.getModule();
    
The buggy line using Torque3.3rc1 templates:
Issue temp_obj1 = (Issue) results.get(j);
ScarabModule temp_obj2 = temp_obj1.getModule();

The sameline using Torque3.2 templates:
Issue temp_obj1 = (Issue) results.get(j);
ScarabModule temp_obj2 = (ScarabModule)temp_obj1.getModule();

The interface of Issue.getModule() (inherited from BaseIssue):
    public Module getModule()

The related sections in the schema.xml of Scarab:
<table name="SCARAB_MODULE" idMethod="idbroker" javaName="ScarabModule"
    baseClass="org.tigris.scarab.om.AbstractScarabModule"
    interface="Module">
...
    
<table name="SCARAB_ISSUE" idMethod="idbroker" javaName="Issue">
...
    <column name="MODULE_ID" required="true" type="INTEGER"></column>

    <foreign-key foreignTable="SCARAB_MODULE">
        <reference local="MODULE_ID" foreign="MODULE_ID"/>
    </foreign-key>
...


 All   Comments   Work Log   Change History   Subversion Commits      Sort Order: Ascending order - Click to sort in descending order
No work has yet been logged on this issue.