I have an Account entity that contains a Notes collection. I'd like to
create a "MyAccounts" screen that lists a few properties of each
account as well as a flag indicating if the account contains a note
that was submitted by someone other than the user running the query.
In a perfect world, I'd like to do something like this:
select
new AccountSummary (
account.ID,
account.Name,
account.Balance,
(
select exists (from Notes note where note.Account = account and
not
note.User = :user
)
)
from Account account
where account.Owner = :user
I know the "select exists" line is way off base, but I'm looking for a
solution that won't require me to return the entire list of notes. Is
this possible without resorting to straight Sql?
Any insight would be appreciated!
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"nhusers" 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/nhusers?hl=en
-~----------~----~----~----~------~----~------~--~---