voodoodyne / subetha

SubEtha Mail is a J2EE-based mailing list manager
Other
13 stars 6 forks source link

Searching for subscribers produces duplicate entries #11

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
Searching for lists or subscribers will produce duplicate entries when there are
multiple email addresses in the search term.  Perhaps need to put a group by
clause in the EJBQL, or make the searching of email addresses a subselect.
------- Additional comments from Jon Stevens Sun May 21 17:34:06 -0700 2006 
-------

isn't this a 'right join'?
------- Additional comments from Jeff Schnitzer Sun May 21 19:01:25 -0700 2006 
-------

Left or right joins would result in even more extra rows returned.  I'm guessing
the most natural construct is a subselect.  Something like:

select sub from Subscription sub 
where sub.list.id = :listId 
and (sub.person.name like :name or 
 (more than 0 results from select email from sub.person.emailAddresses where
email like :email)
)

I don't know how to do that, though.  Gotta read up on EJBQL.

Original issue reported on code.google.com by lhori...@gmail.com on 4 Jun 2009 at 10:17

GoogleCodeExporter commented 9 years ago
Uzi, you're a SQL dweeb...  Can't u fix this??

Original comment by lussm...@gmail.com on 30 Dec 2010 at 4:32