How can fetch one column of one entity

12 views
Skip to first unread message

Kenneth Burgos Nivar

unread,
Feb 24, 2013, 7:15:40 PM2/24/13
to siena-...@googlegroups.com
For example:

@Entity
public class User extends Model {

   @Id(Generator.AUTO_INCREMENT)
    public Long id;

    public String username;
    public String password;
    public String fullname;
}

in Application.index()

   List<String> allFullname = User.all()...  ???? (how can get only every fullname)

thank you.

Erin Drummond

unread,
Feb 24, 2013, 7:21:14 PM2/24/13
to siena-...@googlegroups.com
Hi Kenneth,

As far as I know this isnt possible in Siena, however i'd be interested if someone else stepped in to correct me because id like to do something similar in my code (ive just been taking the performance hit of selecting everything up till now)

Cheers,
Erin



--
You received this message because you are subscribed to the Google Groups "Siena" group.
To unsubscribe from this group and stop receiving emails from it, send an email to siena-discus...@googlegroups.com.
To post to this group, send email to siena-...@googlegroups.com.
Visit this group at http://groups.google.com/group/siena-discuss?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

Kenneth Burgos Nivar

unread,
Feb 24, 2013, 7:28:11 PM2/24/13
to siena-...@googlegroups.com
Erin thank you very much for the info, let's see if anyone has a possible solution.

Pascal Voitot Dev

unread,
Feb 25, 2013, 2:46:56 AM2/25/13
to siena-...@googlegroups.com
If I remember well, it isn't possible because it wasn't possible in GAE when I implemented it.
Maybe it is now but I don't follow GAE improvements since long now;)

Pascal


--

Emanuele Ziglioli

unread,
Feb 25, 2013, 9:18:20 PM2/25/13
to siena-...@googlegroups.com
It's possible on GAE: https://developers.google.com/appengine/docs/java/datastore/projectionqueries

Haven't thought on how to do it in Siena/GAE

Have you had a need to do it?
Reply all
Reply to author
Forward
0 new messages