Is it possible to get entity from ResultRow using ...
# exposed
m
Is it possible to get entity from ResultRow using DSL?
âś… 1
j
Entities in exposed have a
wrapRow
(or
wrapRows
for a collection) function that takes ResultRow as a parameter and returns the entity
👍 1
m
Entity is different than Table?
m
Do I have to use DAO style then to wrapRow?
Is DSL style more for outputting directly to like a DTO for example?
j
The DSL style is a type-safe accessor for SQL, but doesn’t provide any entity-type class. The DAO wraps the DSL to provide said entity-type class
That’s why Exposed represents tables with `object`s, since they are singletons not classes
âś… 1
m
I see. That makes sense. Thanks Jesse!
Are Entities heavier than DTOs?