JD

Results 105 comments of JD

Ok. I can see why you would want to define tables like this in that case. However, general 'wisdom' is that you have one table and you put all of...

Hi @bboure. Good thoughts. The second use case is (kind of) supported using defaults. You need to store the number separately, but default can have a function to pad the...

Instead of returning the entity, map the entity into a business object that calculates that for you. ``` class BusinessObject { constructor(entity) { ... this.id = '${entity.hashKey}#${entity.rangeKey} } } const...

It depends upon your definition of `entity`. I tend to define `entities` in my projects as things that represent persistence. Business logic (such as computing an id that only matters...

FWIW I use typestack [class transformer](https://github.com/typestack/class-transformer) (and validator) to convert (map) between my entities and business (domain) objects.

@vespertilian what's your entity definition?

@vespertilian where is `createProgramSubscriptionSK` defined? Can you reuse that?

I think this is YAGNI. It takes 2 seconds to write a YAML on table definition for Dynamodb.

Which bits get out of sync? Once you have your basic table definition (pk, sk and gsi's) adding more gsi's is a simple addition to the cloud formation. Having it...

I can't see a case where you would want this library to be the single point of truth for defining a table structure. The single point of truth should be...