On Mon, Aug 24, 2009 at 10:37 AM, Rickard Öberg<[email protected]> wrote:
> Niclas Hedhman wrote:
>>
>> 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?
>
> The lookup should be done from the point of view of the RentalShopMixin, so
> as long as the shop can see Booking, it should be fine. And you are sure the
> shop sees the booking?
Yes, pretty much... Here is the Assembler in question;
public class RentalModule
implements Assembler
{
public void assemble( ModuleAssembly module )
throws AssemblyException
{
module.addEntities( Car.class, Customer.class, CarCategory.class );
module.addValues( Address.class, Period.class );
module.addEntities( Booking.class, RentalShop.class
).visibleIn( Visibility.application );
if( module.layerAssembly().applicationAssembly().mode().equals(
Application.Mode.development ) )
{
module.addTransients( InitialData.class ).visibleIn(
Visibility.application );
}
}
}
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