cayenne-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From John Huss <>
Subject Re: SelectQuery + Orderings
Date Tue, 31 Jan 2012 20:29:55 GMT
Well, if your code is well designed your artist fetch logic is probably in
the Artist class so the class name isn't needed.  If you are doing
something inside the class you can use a static import to move all the
artist stuff into the namespace and then use it without qualification.

On Tuesday, January 31, 2012, Durchholz, Joachim <> wrote:
>> You can also generate a path builder class so you can
>> do the same thing for related objects too.  For example:
>> Artist.NAME.eq("Picasso")  // equals
>>   // less than
> Having to repeat Artist. all over the place is exactly what I'd like to
get rid of.
> Hmm...
> ...
> ... I see it's hard to see whether that's actually a problem or not.
> I see myself arguing on matters of principle, which is nice but risks
failure when confronted with reality.
> I also see John arguing with small examples, which is nice but risks
failure when trying to scale to complicated queries.
> How about if everybody with an interest in the topic scour their projects
for the nastiest SQL that they have, and present them here?
> We'd have a set of use cases that will really test the various approaches.
> Regards
> Jo

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message