Thread
#exposed
    d

    damian

    4 years ago
    i'm working with DAOs. i have a table that has a foreign key /
    optionalReferencedOn
    , is it possible in a query to access the referenced object? (for example
    User
    has a reference to
    City
    , and
    City
    has a column
    Inhabitants
    and i want to get all users living in a
    city
    with at least 5k inhabitants) (typing it, it seems like it would be a better approach from "the other side" (looking for cities with inhabitants and getting all
    users
    that have a reference to those cities, but not sure how i'd do that either atm)
    tapac

    tapac

    4 years ago
    If you can write it with DSL, then just call wrapRows other resultset.
    User.wrapRows(UsersTable.select{})