Niclas Hedhman wrote
> 
> The CarrierMovement in layer "DomainLayer" VALUE has a Property to a
> Location, but the only Location defined is a LocationEntity sitting in
> a higher layer ("ContextLayer").
> 
> Marc!!!
> How is this intended to work?
> CarrierMovement is not allowed to access higher layers like that. 
> 

Hi Niclas, Kent and Paul - first, thanks for looking at and updating my
dci-cargo samples!!! I've been absorbed by Scala and functional programming
so I'm a bit far from qi4j/java and the dci-cargo project these days...

I think I thought back then that having the DATA-Structure module
visibilityIn "application" allowed the CarrierMovement to reference the
Location within LocationEntity in the CONTEXT-RoleMapCandidates module. But
maybe that shouldn't have worked?

My intention was generally that no resource should have any dependencies
"upwards", and I must admit that I cheated a bit (and only there, I
promise!) by having the entity files within the data directory, but
/assembling/ them in the ContextLayer! The dependencies looked correct and
good at compile time but at runtime the entities within the DataLayer were
actually belonging to the ContextLayer. You can of course see all this in
the assembly, but it's kind of a hack that goes against the intentions and
that won't show up if you analyze module dependencies. I don't know if/how
that could be avoided. Would be cool if the type system or "something" could
somehow prevent this situation at compile time - but that's opening another
chapter, I guess. 

Another simpler option is of course to move the entity files up into the
context directory, but then it's not that beautiful anymore... :-| Maybe you
can find a more clean/correct way of organizing the assembly?

Cheers,
Marc



--
View this message in context: 
http://qi4j-dev.23929.n6.nabble.com/Test-Failure-in-DCI-sample-tp6925p6931.html
Sent from the Qi4j-dev mailing list archive at Nabble.com.

_______________________________________________
qi4j-dev mailing list
[email protected]
http://lists.ops4j.org/mailman/listinfo/qi4j-dev

Reply via email to