tag:blogger.com,1999:blog-9390811.post7834974213648150426..comments2024-03-26T09:19:44.679+00:00Comments on Ad-Hockery: Querying by Association ReduxRobhttp://www.blogger.com/profile/01855523354151116481noreply@blogger.comBlogger13125tag:blogger.com,1999:blog-9390811.post-44641218769222937892022-08-06T00:19:56.050+01:002022-08-06T00:19:56.050+01:00m5q65d3e97 h8o06l2d53 e5o34l4r82 z8g16o3l83 z2... <a href="https://shatoaez67678.blogspot.com/" rel="nofollow"><strong>m5q65d3e97</strong></a> h8o06l2d53 <a href="https://smeytho75400.blogspot.com/" rel="nofollow"><strong>e5o34l4r82</strong></a> z8g16o3l83 <a href="https://fysesh60365.blogspot.com/" rel="nofollow"><strong>z2i36m5p10</strong></a> t4j85o2s45femmathttps://www.blogger.com/profile/06938794320512496922noreply@blogger.comtag:blogger.com,1999:blog-9390811.post-15224937144711219502022-08-02T04:42:20.781+01:002022-08-02T04:42:20.781+01:00see www.dolabuy.ru check this link right here no... see <a href="https://www.dolabuy.ru/wallets-c-157_158_201/louis-vuitton-multiple-wallet-h26-m69829-replica-black-p-3279.html" rel="nofollow"><strong>www.dolabuy.ru</strong></a> check this link right here now <a href="https://www.dolabuy.ru/gucci-c-209_212/top-quality-gucci-tennis-1977-couple-sneakers-007-p-2175.html" rel="nofollow"><strong>aaa replica bags</strong></a> Visit Your URL <a href="https://www.dolabuy.ru/mens-c-209_266_267/wholesale-christian-louboutin-mens-black-shoes-p-2070.html" rel="nofollow"><strong>Balenciaga Dolabuy</strong></a>thushahttps://www.blogger.com/profile/11721969549713216563noreply@blogger.comtag:blogger.com,1999:blog-9390811.post-84596626429023749112022-07-26T10:12:26.952+01:002022-07-26T10:12:26.952+01:00replica bags nancy fake gucci d9l72f5g73 replica b...replica bags nancy <a href="https://www.dolabuy.ru/gucci-c-157_168/" rel="nofollow"><strong>fake gucci</strong></a> d9l72f5g73 replica bags and watches replica bags lv <a href="https://www.dolabuy.ru/handbags-c-157/" rel="nofollow"><strong>site web</strong></a> n2f45v6p12 replica bags pakistan try this web-site a0s84z8y99 <a href="https://www.dolabuy.ru/louis-vuitton-c-157_158/" rel="nofollow"><strong>louis vuitton replica</strong></a> replica bags forum v7h72c9p80noraseethhttps://www.blogger.com/profile/16077999878444600345noreply@blogger.comtag:blogger.com,1999:blog-9390811.post-54239092701865909712012-02-18T00:17:33.863+00:002012-02-18T00:17:33.863+00:00@justinbroughton I ran into your problem as well a...@justinbroughton I ran into your problem as well and was able to solve it with setting FULL_JOIN on the alias (third parameter).<br /><br />If you are using grails it looks like this:<br /><br />createAlias("tasks", "t", Criteria.FULL_JOIN)DBhttps://www.blogger.com/profile/03317630951183450961noreply@blogger.comtag:blogger.com,1999:blog-9390811.post-66247054492670142822012-02-17T07:24:48.975+00:002012-02-17T07:24:48.975+00:00Holly mother of Jesus! I just spent 10 hours over ...Holly mother of Jesus! I just spent 10 hours over this ... piece of work!<br /><br />Thank you for so clearly describing the problem that matches 100% to mine, and providing a clear and simple workaround! <br /><br />Many, many thanks.<br /><br />DmitryDBhttps://www.blogger.com/profile/03317630951183450961noreply@blogger.comtag:blogger.com,1999:blog-9390811.post-24776890701691831782011-04-14T21:49:15.864+01:002011-04-14T21:49:15.864+01:00This works in the simple case, but not in the more...This works in the simple case, but not in the more complex cases with ands/ors e.g.<br /><br />def ships = Ship.withCriteria {<br /> or {<br /> eq('name', 'Some Random Ship')<br /> createAlias("crew", "c") <br /> eq("c.name", "Blackbeard")<br /> }<br />}<br /><br />I have tried putting the createAlias in a variety of places.<br /><br />My actual failing criteria looks like this:<br /><br />{<br /> isNull('endedAt')<br /> or {<br /> eq('invitationKind', 'OPEN')<br /> and {<br /> eq('invitationKind', 'GROUP')<br /> createAlias('groups', 'g')<br /> 'in'('g.id', visibleGroupIds)<br /> }<br /> }<br />}<br /><br />and it returns nothing, not even the records with invitationKind 'OPEN'.<br /><br />Using the "groups { 'in'(..." works albeit returning objects with a subset of the groups.<br /><br />Any ideas?Anonymoushttps://www.blogger.com/profile/13282569435959539955noreply@blogger.comtag:blogger.com,1999:blog-9390811.post-54552818963411143912011-01-25T09:15:11.433+00:002011-01-25T09:15:11.433+00:00There is a Grails defect for this:
http://jira.cod...There is a Grails defect for this:<br />http://jira.codehaus.org/browse/GRAILS-7087Fabhttps://www.blogger.com/profile/00012279301463689401noreply@blogger.comtag:blogger.com,1999:blog-9390811.post-36925052319117455932010-06-30T08:55:47.685+01:002010-06-30T08:55:47.685+01:00Thanks Rob, your example was a real lifesaver, I&#...Thanks Rob, your example was a real lifesaver, I've been struggling to query multiple associations, since pretty much all of the grails documentation only show examples of queries on a single domain object.<br /><br />Cheers<br />JacquesAnonymousnoreply@blogger.comtag:blogger.com,1999:blog-9390811.post-91588446565348981672010-05-26T16:14:24.191+01:002010-05-26T16:14:24.191+01:00Almost a year on and this post is still saving bac...Almost a year on and this post is still saving bacon :) This was one hard bug to track down! Thanks again robert! Now to understand aliases... don't worry I have a copy of Grails in Action right here :)johnrellishttps://www.blogger.com/profile/13318765113024624030noreply@blogger.comtag:blogger.com,1999:blog-9390811.post-44478986558686648272010-02-10T19:19:52.094+00:002010-02-10T19:19:52.094+00:00Thank you very much for the explanation and exampl...Thank you very much for the explanation and example. I've been working on this for (at least) a day, and couldn't figure out what was going on until I read your excellent explanation and perfect example.<br /><br />You really helped.<br />Thanks very much!<br />Burt PriorUnknownhttps://www.blogger.com/profile/06387651231741132271noreply@blogger.comtag:blogger.com,1999:blog-9390811.post-50154420643776171912009-10-22T13:09:23.774+01:002009-10-22T13:09:23.774+01:00thanks for the criteria + alias sample ..
helped ...thanks for the criteria + alias sample .. <br />helped alot ..TMaushttps://www.blogger.com/profile/00168467367358627682noreply@blogger.comtag:blogger.com,1999:blog-9390811.post-78395456024846211912009-06-19T13:43:54.285+01:002009-06-19T13:43:54.285+01:00You can specify the join type on the createAlias c...You can specify the join type on the createAlias call but INNER_JOIN is the default which works as per the example, LEFT_JOIN reintroduces the bug and FULL_JOIN fails with invalid SQL!Robhttps://www.blogger.com/profile/01855523354151116481noreply@blogger.comtag:blogger.com,1999:blog-9390811.post-67001074638475530322009-06-19T05:14:42.736+01:002009-06-19T05:14:42.736+01:00This is fascinating. I noticed this issue a while...This is fascinating. I noticed this issue a while back and couldn't figure out what was going on. I would like to know if there is a way to use a a criteria search that returns the ships with their pirates. Your second solution only works because of lazy loading. If we wanted to be more efficient, is there a way to retrieve the ship and all of it's pirates in one query? Do we have to resort of HQL? <br /><br />I suppose you can set the fetch mode of the relationship to 'eager', but we may not want this in all situations.<br /><br />Andrewanschoewehttps://www.blogger.com/profile/02423219551932139567noreply@blogger.com