endersoncosta / herbs2knex

Other
0 stars 2 forks source link

`findBy` and other methods should use entity field name (camelCase), not the table field name (snake_case) #5

Closed dalssoft closed 3 years ago

dalssoft commented 3 years ago

instead of:

const ret = await itemRepo.findBy({ string_test: ["john"] })

it should be:

const ret = await itemRepo.findBy({ stringTest: ["john"] })

reason: The idea is to not expose the underlying infrastructure (tables and its fields) to the consumer of the repository (probably a use case)

endersoncosta commented 3 years ago

Change made #10