Question: I just started to learn Ruby on Rails. And when I used the rails to do the test, an error occurred as: 
UserTest#test\_the\_truth:
ActiveRecord::StatementInvalid: Mysql2::Error: Table 'eula\_test.destroys' doesn't exist: SHOW FULL FIELDS FROM `destroys`
I don't know what is eula\_test.destroys and how should I solve this problem.

Answer: 
Entity class are similar to all other classes. So `greendao` generates properties for all rows and you can access them as you access all others properties form "normal" classes.

To access `Id` property of `UserEntity` you can use getter `user.getId()`.

From this query you are getting list of users. You can access it as you are accessing any other list in `Java`.

To get first user from database you can use code similar to:

```
List<User> users = usersDao.queryBuilder().orderDesc(...).limit(1).list();
if (users.size() < 1) return null;
return users.get(0);

```

To get last user I suggest to use similar query with reversed order:

```
List<User> users = usersDao.queryBuilder().orderAsc(...).limit(1).list();
if (users.size() < 1) return null;
return users.get(0);

```

If your query returns only one unique entity you can use `unique` method:

```
User user = usersDao.queryBuilder().where(...).unique();

```

You don't need to build these queries all the time. You can build it once, and then reuse it:

```
private Query<User> mSomeUserQuery;
...
// initialization
mSomeUserQuery = usersDao.queryBuilder().where(...).build();
// usage
User user = mSomeUserQuery.forCurrentThread().unique();

```
Greendao lists are not different to other lists in Java. You just have to google how to iterate through lists. Result: [Ways to iterate over a List in java?](https://stackoverflow.com/questions/18410035/ways-to-iterate-over-a-list-in-java) 

But here is the answer with the example to get the name value from an user:

```
for(User user : users){
     String name = user.getName();
 }

```