Skip to content

Database.From on Annotated Types Supported? #66

Answered by maxtoroq
mitchelllee222 asked this question in Q&A
Discussion options

You must be logged in to vote

The issue is that you are using SqlBuilder, so you are responsible for mapping columns to properties.

A hibrid approach would be something like this (C#):

// use a sub-query that has the proper mapping
var query = SQL
   .SELECT("*")
   .FROM(db.Table<ACU_FORM>().GetDefiningQuery(), "t0");

// here you can mutate query

// now, back to SqlSet
var o = db.From<ACU_FORM>(query);

foreach (var i in o) {
   MsgBox(i.ID)
}

Replies: 6 comments

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Answer selected by maxtoroq
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
# for free to join this conversation on GitHub. Already have an account? # to comment
Category
Q&A
Labels
None yet
2 participants
Converted from issue

This discussion was converted from issue #66 on December 09, 2020 00:03.