Closed stockbal closed 1 week ago
This PR addresses the following issues
// model.cds entity Books { key ID : Integer; title : String; }
class Book { } class Books extends Array<Book> {}
~1) No compiler issues, but both queries actually return type any instead of Book~
any
Book
let selectOne: Book selectOne = await SELECT.from(Books, 42) selectOne = await SELECT.from(Books, 42, (b: Book) => b.title)
2) Produces typescript issues because the plural type is the assumed result of the queries
let selectOne: Book selectOne = await SELECT.from(Book, 42) selectOne = await SELECT.from(Book, 42, ["title"]) selectOne = await SELECT.from(Book, 42, (b: Book) => f.x)
Due to #201, Issue 1) no longer exists, and fix for issue 2) has been adjusted
This PR addresses the following issues
Sample schema
Generated classes from cds-typer
Issues
~1) No compiler issues, but both queries actually return type
any
instead ofBook
~2) Produces typescript issues because the plural type is the assumed result of the queries