| Summary: | Inheritance doesn't work right with multiple modules. | ||||||||
|---|---|---|---|---|---|---|---|---|---|
| Product: | [Technology] Tigerstripe | Reporter: | Steve Jerman <sjerman> | ||||||
| Component: | Core | Assignee: | 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: |
|
||||||||
Created attachment 172073 [details]
Workspace (with .metadata deleted)
Created attachment 172102 [details]
Imporved template
This template might show the problem even more clearly
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?
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. I suggest we put it in, and see what happens... OK. I've fixed it. |
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