Uploaded image for project: 'Spring Roo'
  1. Spring Roo
  2. ROO-1275

1:m relationships not being generated properly when using the "field set" command

    XMLWordPrintable

    Details

    • Type: Task
    • Status: Closed
    • Priority: Critical
    • Resolution: Deferred
    • Affects Version/s: 1.1.0.M3
    • Fix Version/s: 1.1.0.RC1
    • Component/s: GWT
    • Labels:
      None
    • Environment:
      Win7 64bit, 64bit Sun JVM 1.6.0_21

      Description

      I ran this script using the 1.1.0.M3 release:

      project --topLevelPackage test
      persistence setup --provider HIBERNATE --database HYPERSONIC_IN_MEMORY 
      entity --class ~domain.Album
      field string --fieldName name --notNull 
      entity --class ~domain.Track
      field string --fieldName name --notNull 
      field reference --fieldName album --type ~domain.Album
      field set --fieldName tracks --element ~domain.Track --class ~domain.Album --mappedBy album
      gwt setup
      

      and then ran mvn tomcat:run

      After downloading some dependencies, I got the following compiler errors:

      [ERROR] The import test.gwt.request.SetRecord cannot be resolved
      [ERROR] The import test.gwt.request.SetRecord cannot be resolved
      [ERROR] test.gwt.request.SetRecord cannot be resolved to a type
      [ERROR] AlbumRecord.tracks cannot be resolved
      [ERROR] test.gwt.scaffold.generated.SetRecordRenderer cannot be resolved to a type
      [ERROR] The import test.gwt.request.SetRecord cannot be resolved
      [ERROR] SetRecord cannot be resolved to a type
      [ERROR] The method setRequest() is undefined for the type ApplicationRequestFactory
      [ERROR] test.gwt.scaffold.generated.SetRecordRenderer cannot be resolved to a type
      [ERROR] SetRecord cannot be resolved to a type
      [ERROR] The import test.gwt.request.SetRecord cannot be resolved
      [ERROR] The import test.gwt.request.SetRecord cannot be resolved
      [ERROR] test.gwt.request.SetRecord cannot be resolved to a type
      [ERROR] test.gwt.request.SetRecord cannot be resolved to a type
      [ERROR] SetRecord cannot be resolved to a type
      [ERROR] SetRecord cannot be resolved to a type
      [ERROR] The import test.gwt.request.SetRecord cannot be resolved
      [ERROR] The import test.gwt.request.SetRecord cannot be resolved
      [ERROR] The import test.gwt.request.SetRecord cannot be resolved
      [ERROR] test.gwt.request.SetRecord cannot be resolved to a type
      [ERROR] test.gwt.request.SetRecord cannot be resolved to a type
      [ERROR] test.gwt.scaffold.generated.SetRecordRenderer cannot be resolved to a type
      [ERROR] SetRecord cannot be resolved to a type
      [ERROR] The import test.gwt.request.SetRecord cannot be resolved
      [ERROR] test.gwt.scaffold.generated.SetRecordRenderer cannot be resolved to a type
      [ERROR] The method getTracks() is undefined for the type AlbumRecord
      [WARNING] advice defined in org.springframework.mock.staticmock.AnnotationDrivenStaticEntityMockingControl has not been applied [Xlint:adviceDidNotMatch]
      [WARNING] advice defined in org.springframework.mock.staticmock.AbstractMethodMockingControl has not been applied [Xlint:adviceDidNotMatch]
      [INFO] ------------------------------------------------------------------------
      [ERROR] BUILD ERROR
      [INFO] ------------------------------------------------------------------------
      [INFO] Compiler errors :
      error at import test.gwt.request.SetRecord;
             ^^^^^^^^^^^^^^^^^^^^^^^^^
      C:\java\projects\m3\src\main\java\test\gwt\scaffold\generated\AlbumRecordRenderer.java:26:0::0 The import test.gwt.request.SetRecord cannot be resolved
      error at import test.gwt.request.SetRecord;
             ^^^^^^^^^^^^^^^^^^^^^^^^^
      C:\java\projects\m3\src\main\java\test\gwt\scaffold\generated\AlbumListView.java:15:0::0 The import test.gwt.request.SetRecord cannot be resolved
      error at columns.add(new PropertyColumn<AlbumRecord, test.gwt.request.SetRecord>(AlbumRecord.tracks, test.gwt.scaffold.generated.SetRecordRenderer.instance()));
                                                  ^^^^^^^^^^^^^^^^^^^^
      C:\java\projects\m3\src\main\java\test\gwt\scaffold\generated\AlbumListView.java:46:0::0 test.gwt.request.SetRecord cannot be resolved to a type
      error at columns.add(new PropertyColumn<AlbumRecord, test.gwt.request.SetRecord>(AlbumRecord.tracks, test.gwt.scaffold.generated.SetRecordRenderer.instance()));
                                                                              ^^^^^^^^^^^^
      C:\java\projects\m3\src\main\java\test\gwt\scaffold\generated\AlbumListView.java:46:0::0 AlbumRecord.tracks cannot be resolved
      error at columns.add(new PropertyColumn<AlbumRecord, test.gwt.request.SetRecord>(AlbumRecord.tracks, test.gwt.scaffold.generated.SetRecordRenderer.instance()));
                                                                                                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
      ^^^^^^^^^^^
      C:\java\projects\m3\src\main\java\test\gwt\scaffold\generated\AlbumListView.java:46:0::0 test.gwt.scaffold.generated.SetRecordRenderer cannot be resolved to a type
      error at import test.gwt.request.SetRecord;
             ^^^^^^^^^^^^^^^^^^^^^^^^^
      C:\java\projects\m3\src\main\java\test\gwt\ui\AlbumEditActivity.java:13:0::0 The import test.gwt.request.SetRecord cannot be resolved
      error at getAlbumEditView().setTracksPickerValues(Collections.<SetRecord> emptyList());
                                                            ^^^^
      C:\java\projects\m3\src\main\java\test\gwt\ui\AlbumEditActivity.java:59:0::0 SetRecord cannot be resolved to a type
      error at requests.setRequest().findSetEntries(0, 50).with(
               ^^^^^
      C:\java\projects\m3\src\main\java\test\gwt\ui\AlbumEditActivity.java:61:0::0 The method setRequest() is undefined for the type ApplicationRequestFactory
      error at test.gwt.scaffold.generated.SetRecordRenderer.instance().getPaths()).fire(
      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
      C:\java\projects\m3\src\main\java\test\gwt\ui\AlbumEditActivity.java:62:0::0 test.gwt.scaffold.generated.SetRecordRenderer cannot be resolved to a type
      error at new Receiver<List<SetRecord>>() {
      
      C:\java\projects\m3\src\main\java\test\gwt\ui\AlbumEditActivity.java:63:0::0 SetRecord cannot be resolved to a type
      error at import test.gwt.request.SetRecord;
             ^^^^^^^^^^^^^^^^^^^^^^^^^
      C:\java\projects\m3\src\main\java\test\gwt\ui\AlbumListActivity.java:11:0::0 The import test.gwt.request.SetRecord cannot be resolved
      error at import test.gwt.request.SetRecord;
             ^^^^^^^^^^^^^^^^^^^^^^^^^
      C:\java\projects\m3\src\main\java\test\gwt\request\AlbumRecord.java:8:0::0 The import test.gwt.request.SetRecord cannotbe resolved
      error at Property<test.gwt.request.SetRecord> tracks = new com.google.gwt.valuestore.shared.Property<test.gwt.request.Se
      tRecord>("tracks", "Tracks", test.gwt.request.SetRecord.class);
               ^^^^^^^^^^^^^^^^^^^^^
      C:\java\projects\m3\src\main\java\test\gwt\request\AlbumRecord.java:18:0::0 test.gwt.request.SetRecord cannot be resolved to a type
      error at Property<test.gwt.request.SetRecord> tracks = new com.google.gwt.valuestore.shared.Property<test.gwt.request.SetRecord>("tracks", "Tracks", test.gwt.request.SetRecord.class);
                                                                                                  ^^^^^^^^^^^^^^^^^^^^^
      C:\java\projects\m3\src\main\java\test\gwt\request\AlbumRecord.java:18:0::0 test.gwt.request.SetRecord cannot be resolved to a type
      error at abstract SetRecord getTracks();
               ^^^^
      C:\java\projects\m3\src\main\java\test\gwt\request\AlbumRecord.java:22:0::0 SetRecord cannot be resolved to a type
      error at abstract void setTracks(SetRecord tracks);
                              ^^^^
      C:\java\projects\m3\src\main\java\test\gwt\request\AlbumRecord.java:28:0::0 SetRecord cannot be resolved to a type
      error at import test.gwt.request.SetRecord;
             ^^^^^^^^^^^^^^^^^^^^^^^^^
      C:\java\projects\m3\src\main\java\test\gwt\ui\AlbumDetailsActivity.java:14:0::0 The import test.gwt.request.SetRecord cannot be resolved
      error at import test.gwt.request.SetRecord;
             ^^^^^^^^^^^^^^^^^^^^^^^^^
      C:\java\projects\m3\src\main\java\test\gwt\ui\AlbumActivitiesMapper.java:7:0::0 The import test.gwt.request.SetRecord cannot be resolved
      error at import test.gwt.request.SetRecord;
             ^^^^^^^^^^^^^^^^^^^^^^^^^
      C:\java\projects\m3\src\main\java\test\gwt\scaffold\generated\AlbumEditView.java:28:0::0 The import test.gwt.request.SetRecord cannot be resolved
      error at @UiField (provided = true) ValueListBox<test.gwt.request.SetRecord> tracks=new ValueListBox<test.gwt.request.SetRecord>(test.gwt.scaffold.generated.SetRecordRenderer.instance());
                                              ^^^^^^^^^^^^^^^^^^^^^^^^
      C:\java\projects\m3\src\main\java\test\gwt\scaffold\generated\AlbumEditView.java:48:0::0 test.gwt.request.SetRecord cannot be resolved to a type
      error at @UiField (provided = true) ValueListBox<test.gwt.request.SetRecord> tracks=new ValueListBox<test.gwt.request.SetRecord>(test.gwt.scaffold.generated.SetRecordRenderer.instance());
                                                                                                  ^^^^^^^^^^^^^^^^^^^^^^^^
      C:\java\projects\m3\src\main\java\test\gwt\scaffold\generated\AlbumEditView.java:48:0::0 test.gwt.request.SetRecord cannot be resolved to a type
      error at @UiField (provided = true) ValueListBox<test.gwt.request.SetRecord> tracks=new ValueListBox<test.gwt.request.SetRecord>(test.gwt.scaffold.generated.SetRecordRenderer.instance());
      
      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
      C:\java\projects\m3\src\main\java\test\gwt\scaffold\generated\AlbumEditView.java:48:0::0 test.gwt.scaffold.generated.SetRecordRenderer cannot be resolved to a type
      error at public void setTracksPickerValues(Collection<SetRecord> values) {
                                                   ^^^
      C:\java\projects\m3\src\main\java\test\gwt\scaffold\generated\AlbumEditView.java:85:0::0 SetRecord cannot be resolved to a type
      error at import test.gwt.request.SetRecord;
             ^^^^^^^^^^^^^^^^^^^^^^^^^
      C:\java\projects\m3\src\main\java\test\gwt\scaffold\generated\AlbumDetailsView.java:17:0::0 The import test.gwt.request.SetRecord cannot be resolved
      error at tracks.setInnerText(test.gwt.scaffold.generated.SetRecordRenderer.instance().render(record.getTracks()));
                          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
      C:\java\projects\m3\src\main\java\test\gwt\scaffold\generated\AlbumDetailsView.java:70:0::0 test.gwt.scaffold.generated.SetRecordRenderer cannot be resolved to a type
      error at tracks.setInnerText(test.gwt.scaffold.generated.SetRecordRenderer.instance().render(record.getTracks()));
                                                                                                 ^^^
      C:\java\projects\m3\src\main\java\test\gwt\scaffold\generated\AlbumDetailsView.java:70:0::0 The method getTracks() is undefined for the type AlbumRecord
      

      Looks some code is not properly generated? Could be that I made a mistake myself, but in that case Roo should've said something.

        Attachments

          Activity

            People

            Assignee:
            cromwellian Ray Cromwell
            Reporter:
            jkuipers Joris Kuipers
            Votes:
            12 Vote for this issue
            Watchers:
            15 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: