Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 317112

Summary: Inheritance doesn't work right with multiple modules.
Product: [Technology] Tigerstripe Reporter: Steve Jerman <sjerman>
Component: CoreAssignee: Project Inbox <tigerstripe.core-inbox>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: rcraddoc, yuri
Version: 0.5   
Target Milestone: 0.5M0   
Hardware: PC   
OS: Mac OS X - Carbon (unsup.)   
Whiteboard:
Attachments:
Description Flags
Workspace (with .metadata deleted)
none
Imporved template none

Description Steve Jerman CLA 2010-06-16 16:44:34 EDT
OK, found another case that breaks stuff...

If you have a superclass which inherits from a class in a module which inherits from a class in a second module. The attributes in the top most class aren’t see as inherited fields in the first class.

Attached are two modules, and a workspace...

If you generate with the projects open....

Entity:  SubTwo
                    Attribute : desc
                    Attribute : name

If you generate with modules:

Entity:  SubTwo
                    Attribute : desc

Steve
Comment 1 Steve Jerman CLA 2010-06-16 16:55:46 EDT
Created attachment 172073 [details]
Workspace (with .metadata deleted)
Comment 2 Richard Craddock CLA 2010-06-17 05:51:19 EDT
Created attachment 172102 [details]
Imporved template

This template might show the problem even more clearly
Comment 3 Yuri Strot CLA 2010-06-17 13:03:16 EDT
I found a very simple fix for this problem (not committed yet). Currently TigerstripeProject have following method: 

private void loadReferences(Document) throws TigerstripeException {
  this.modelReferences = new ArrayList<ModelReference>();

  // Bug 259: references should be ignored when within an embedded module
  // descriptor.
  if (getBaseDir() == null) return;

  ...
}

There is why model references was not loaded for modules. When I remove this condition generation works fine.

Do you guys know why this condition was added?
Comment 4 Richard Craddock CLA 2010-06-18 04:54:07 EDT
I can't understand why we do that..

Bug 259 was on the very very very old TS bugzilla, so we can't see that any more.
Comment 5 Richard Craddock CLA 2010-06-18 04:56:16 EDT
I suggest we put it in, and see what happens...
Comment 6 Yuri Strot CLA 2010-06-20 05:38:56 EDT
OK. I've fixed it.