When i am using now
$result=Username::findFirst() i get all the Username´s entries. but not the options.
There i have to call it like result->usernameOptions. Is there a way do avoid the lazy loading and load already all relations with the "Username::findFirst() and/or Username::find()"?

You can overload the static method Model::findFirst and Model::find to first do the normal find and then to perform an action right after that. It will require a non-basic understanding of working with PHP static scopes.

Also you can have it be automatically done in the afterFetch model event but then it will fire the query N times, once for each record.

Why are you specifically recommending the query builder over PHQL style? I see it that it is just a preference and it doesn't resolve his issue either way. The issue is just a dream today and doesn't help him.

If you select just a single column then it will be returning a complex resultset intead of a simple one. That means that it isn't a model record anymore. You need to accept all * fields to recieve a model.

Maybe I misread your last question. You are asking for records from two fields but you need to have a join condition and to first even select the other table with the appropriate join, ex; LEFT, RIGHT. I like using the normal query.

now i just wanna have the field for example id of the User Model and only the field value of the Option Model. but ther i dont know how to add the columns from the relations. I dont think i need to add a extra join because the relation is already defined!?

There are many ways to get data in Phalcon and I'll give you the style that I like to use.

use Phalcon\Mvc\Model\Query;
// I like to use this approach because some types of aliases currently fail for much more complicated queries.
$User = "Namespace\\User";
$Option = "Namespace\\Option";
// With implicit joining disabled
$phql = "SELECT User.id, Option.value FROM $User User JOIN $Option Option ON User.id = Option_user.id";
// With implicit joining enabled based on defined relationship to automatically fill in the "ON" condition
$phql = "SELECT User.id, Option.value FROM $User User JOIN $Option Option";
$query = new Query($phql, $di);
// The result will be a complex resultset, meaning not models.
$results = $query->execute();

Also apologies if it doesn't work because I didn't actually run this code.

[edit] I'll add that I only use this style if I'm doing joins because it allows the PHQL to be easily expanded into complicated nested queries.

thanks dschissler
with phql i already tried it and it is working. but i was just wondering if its also somehow possible over the normal "find" function. tried already many ways but with everything i got the error that the module or alias could not be found.

There is also a way to define an alias for a namespace for the entire system and that is more concise then saving it as a variable like $User = "Namespace\\User"; for each Query. So perhaps try that if you are finding that the queiries are looking clumsy.