--
You received this message because you are subscribed to the Google Groups "Siena" group.
To view this discussion on the web visit https://groups.google.com/d/msg/siena-discuss/-/NIUlhRdkbLsJ.
To post to this group, send email to siena-...@googlegroups.com.
To unsubscribe from this group, send email to siena-discus...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/siena-discuss?hl=en.
projection is done on Query, isn't it?
why not adding filter on query directly?
<V>V Model.all(Class<T> clazz).projection( String field ).get();
do you have an example of your polymorphic class, I'm not sure to understand well.
On Thursday, 11 October 2012 19:59:37 UTC+13, Pascal wrote:projection is done on Query, isn't it?
why not adding filter on query directly?
<V>V Model.all(Class<T> clazz).projection( String field ).get();that's a good idea
do you have an example of your polymorphic class, I'm not sure to understand well.let me think..., a class Animal contains (name, species, breed, owner)A class Dog could extend Animal in a polymorphic way, so it could add or remove fields.The point is storing all Animals in one big Animal table without necessarily adding all fields for all sub-entities to the parent entity.I suppose this is not the same as the case of projection queries but it would be perhaps an alternative way to implement polymorphism.
PascalOn Thu, Oct 11, 2012 at 1:11 AM, Emanuele Ziglioli <the...@emanueleziglioli.it> wrote:
Hi everyone,I'm thinking about starting to use GAE's projection queries, where you can query only certain fields and not the whole entity. Thinking about how to do it in Siena, what do you think about something like:<V>V Model.all(Class<T> clazz).get( String field ); // it returns one field only<T>T Model.all(Class<T> clazz).get( String fields... ); // it queries and fills the model with a subset of fields
Alternatively we could look at implementing polymorphic classes that way, where only the fields of a certain queried, not the whole entitiy. So there would be a static definition of a subset of an entity, as a new class, but with some annotations to say that that class is polymorfic to another, larger entity.--To post to this group, send email to siena-...@googlegroups.com.
You received this message because you are subscribed to the Google Groups "Siena" group.
To view this discussion on the web visit https://groups.google.com/d/msg/siena-discuss/-/NIUlhRdkbLsJ.
To unsubscribe from this group, send email to siena-discus...@googlegroups.com.
--
You received this message because you are subscribed to the Google Groups "Siena" group.
To view this discussion on the web visit https://groups.google.com/d/msg/siena-discuss/-/RLA0VAEHjHEJ.