I usually find that declaring aliases is a good thing for readablity but
this should work aswell:

" from PaymentRun where PaymentRun.Action = :action and
PaymentRun.Batch not in ( select CompositeBatchMember.Batch from
CompositeBatchMember )"


-- 
Jakob Tikjøb Andersen


On Thu, Aug 6, 2009 at 1:27 PM, Mark <[email protected]> wrote:

>
> Can anyone help with this ? Im running in to a mapping problem that I
> don't see a resolution to.
>
> I have two AR classes:
>
> class PaymentRun
> {
> ...
> [BelongsTo]
> public Batch Batch
> {
> }
> ...
> }
>
> class CompositeBatchMember
> {
> ...
> [BelongsTo]
> public Batch Batch
> {
> }
> ...
>
> }
>
> I'm attempting to execute this piece of HQL:
>
> " from PaymentRun where PaymentRun.Action = :action and
> PaymentRun.Batch not in ( select Batch from CompositeBatchMember"
>
> which throws exception "undefined alias or unknown mapping Batch"
>
> Batch is clearly defined in the mapping for both objects, so I don't
> understand why its getting upset ?
>
> Thanks
> >
>

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Castle Project Users" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/castle-project-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to