Skip to content

Row で select した情報の扱いについて #998

Closed Answered by nakamura-to
ironclad-15256304 asked this question in Q&A
Discussion options

You must be logged in to vote

Rowgetメソッドを使って値を取得できます。

Employee_ e = new Employee_();

List<Row> list =
    nativeSql
        .from(e)
        .orderBy(c -> c.asc(e.employeeId))
        .select(e.employeeId, e.employeeName, e.employeeNo, ...  ...)
        .fetch();

for (Row row : list) {
    int id = row.get(e.employeeId);
    String name = row.get(e.employeeName);
}

Replies: 1 comment 3 replies

Comment options

You must be logged in to vote
3 replies
@ironclad-15256304
Comment options

@nakamura-to
Comment options

@ironclad-15256304
Comment options

Answer selected by ironclad-15256304
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants