tags:

views:

28

answers:

1

I have:

class A
{
    B b;
}

class B
{
}

I know i can do this:

from A a
join a.b b

but what I need to do is this (pseudo-HQL, it doesn't parse, hence this post):

from B b
left outer join A a on a.b = b

I get "Path expected for join!" :(

I want a complete list of Bs joined onto any As, if they exist. Is this possible?

I can't use a right join because SQLite doesn't support them grrrrr

What can I do to solve this?

Thanks

A: 

Is there a reason you can't have

class B {
    @ManyToMany
    A a;
}

?

Jonathan Feinberg
Yes. Its not a bidirectional relationship
Andrew Bullock
Well, actually, from your question... it *is*! I suppose you could always try something like sacrificing a goat. Or mapping a native SQL query. Whatever you think best.
Jonathan Feinberg