[FLOW3-general] Getting all Values of some Objects Property
marc neuhaus
apocalip at googlemail.com
Fri Jan 22 13:25:17 CET 2010
Hopefully better example:
I'm Building a listview for a Model and i want to Provider the possibility
to Filter in certain columns. In columns with proper relations this isn't a
Problem. But for a Contacts Table i want to Be able to filter a column
containing the contacts Street with Street Number. This column doesnt make
Sense to be put in a seperate Street Model in my opinion. Same goes for
firstname and lastname.
I Hope this usecase makes more Sense.
Greetings Marc
2010/1/22 Karsten Dambekalns <karsten at typo3.org>
> Hi.
>
> On 21.01.10 13:17, marc neuhaus wrote:
> > I was wondering how i would accomplish something equivalent to this:
> > "SELECT date FROM posts GROUP BY date;"
>
> So, what you want is
> SELECT DISTINCT date FROM posts
> (should be cheaper than grouping). Anyway, that doesn't matter here. :)
>
> > My first idea was to get All Objects through findAll() an iterate over
> all
> > of them and compiling an array of the Used Properties:
>
> Right.
>
> > Problem with this is, that this would take way to long if there are lots
> of
> > $posts.
>
> Probably. Think about your use case, how would you handle this in a
> world without RDBMS'? Think about your data structure ad try to find a
> way to model that efficiently.
>
> > Is this the only way to do something like this at the moment?
>
> Yes.
>
> > Is something planned/specified to provide a better way to retrieve
> something
> > like this?
>
> Well, the problem is, we provide object persistence. If you receive
> single properties, you no longer deal with objects, and what good is the
> list of dates without relation to any objects? (Probably you simply
> chose a bad example...)
>
> Grouping and joins are another example where the we-are-used-to-it
> problem clashes with the new paradigms. What do you get from two objects
> if you join them? How do you group objects like in SQL?
>
> All that said, lazy loading will come back in FLOW3, this could help
> with the performance problem you expect in the loop-solution. And we'll
> try to find a way to do something like that what you need - if it makes
> sense we might even integrate it :). If that happens it could be
> something like the way JSR-283 describes table-like views on nodes.
>
> Regards,
> Karsten
> _______________________________________________
> FLOW3-general mailing list
> FLOW3-general at lists.typo3.org
> http://lists.typo3.org/cgi-bin/mailman/listinfo/flow3-general
>
More information about the FLOW3-general
mailing list