> Not quite sure what you mean by 'denormalised data'?
Well this could be more of a Tim problem than a Bookshelf problem so please bear with me :-P I have "customers" and "suppliers". In some cases a supplier is also a customer, blah blah. Their shared properties like name, phone, email have been factored out into "parties". Specifics like "customers"."sellers_permit" and "suppliers"."account_number" are factored into their own tables. Customers and suppliers are read and populated into forms including their party data, so when JSON is sent to my server, the various properties need to be picked and inserted into the correct tables. This is just one data management thing I'm offloading to the server. Anyway, the Modeling in my app happens on the client and my API just does persistence, not much behavior. On Sunday, December 27, 2015 at 8:19:15 PM UTC-8, justin hyland wrote: > > Thanks for the replying back with what you found and your thought process >> for your decision. This may seem trivial to some, but contributions like >> this always help. > > > For sure, I wish I found something like this when I was comparing the two, > haha. Im going to learn a little more about BookshelfJS/KnexJS, and leave a > review on my blog, ill post a link in here when its done! > > >> One thing that was a pain for bookshelf models was dealing with >> denormalised data. I guess you could parse payloads into db rows but by >> then, you may as well just call knex.insert instead of forging models. >> > > Not quite sure what you mean by 'denormalised data'? > > >> That along with object key formatting difficulties (my_column in db >> myColumn in js) made me switch to Knex alone. It is simple enough to just >> pass rows through a function before/after data access. >> > > I can agree with that one, I was going to write a plugin that uses > lodashes camelCase and snakeCase to convert the DB columns and tables from > snake to camel, and let you refer to them in the camel case form when > updating/searching/inserting/deleting rows. > > -- Job board: http://jobs.nodejs.org/ New group rules: https://gist.github.com/othiym23/9886289#file-moderation-policy-md Old group rules: https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines --- You received this message because you are subscribed to the Google Groups "nodejs" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/nodejs/8cee2a45-942a-4694-bc57-16ebdf25b597%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
