iciql icon indicating copy to clipboard operation
iciql copied to clipboard

select object enum

Open uchicom opened this issue 2 years ago • 0 comments

I want to do this.

SQL

select id,name from book;
select id,book_id,count,kind from stock; // kind is enum
↓ join select
select T1.id, T1.name, T2.kind from book T1 inner join stock T2 on T1.id = T2.book_id

iciql

Book b = new Book();
Stock s = new Stock();
db.from(b).innerJoin(s).on(b.id).is(s.book_id).select(
  new BookStock() {
    {
      id = b.id;
      name = b.name;
      kind = s.kind; // kind is enum.
    }
});

However, an error has occurred.The cause is a "special case" of Query.java. For "select object enum”, I removed a "special case". I couldn't understand the "special case" of Query.java.

uchicom avatar Apr 25 '22 11:04 uchicom