Rickard,

I am working on a relatively straight forward sample (Car Rental), to
be used as the base for the JavaZone presentation...

The "webLayer" starts the UnitOfWork, and calls RentalShop.findAllBookings()

public interface RentalShop extends EntityComposite
{
    List<Booking> findAllBookings();
    :
    interface State
    {
        ManyAssociation<Booking> bookings();
        :

    class RentalShopMixin
        implements RentalShop
    {
        @This private State state;

      :
        public List<Booking> findAllBookings()
        {
            return state.bookings().toList();
        }
      :

And with this I get the Exception saying;

org.qi4j.api.unitofwork.EntityTypeNotFoundException: Could not find an
EntityComposite of type org.qi4j.pres.javazone09.domain.Booking
        at 
org.qi4j.runtime.structure.ModuleUnitOfWork.get(ModuleUnitOfWork.java:227)
        at 
org.qi4j.runtime.entity.association.AbstractAssociationInstance.getEntity(AbstractAssociationInstance.java:68)
        at 
org.qi4j.runtime.entity.association.ManyAssociationInstance.toList(ManyAssociationInstance.java:85)
        at 
org.qi4j.pres.javazone09.domain.RentalShop$RentalShopMixin.findAllBookings(RentalShop.java:191)

The ModuleUnitOfWork is in fact the "PagesModule" which sits in the
"WebLayer" and does not have visibility into anything but the
RentalShop itself. But wasn't it fixed that the visibility followed
the Structure in the call??

Am I missing something, or am I looking at a bug?


Cheers
-- 
Niclas Hedhman, Software Developer
http://www.qi4j.org - New Energy for Java

I  live here; http://tinyurl.com/2qq9er
I  work here; http://tinyurl.com/2ymelc
I relax here; http://tinyurl.com/2cgsug

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

Reply via email to