xavierlacot / joli.js

joli.js is an Activerecord-like javascript ORM, particularly suited for being used in the Appcelerator Titanium Mobile framework.
MIT License
267 stars 60 forks source link

Query or find methods return a lot of un-needed objects #9

Closed rblalock closed 12 years ago

rblalock commented 13 years ago

Just noticed by printing out the return object of query() or find() methods really returns a WHOLE bunch of duplicate data. i.e. returns the fields in several different objects within the one object. example - https://gist.github.com/72329972fc50c8f1357c#comments

xavierlacot commented 12 years ago

Hi Rick,

I understand what you explain but, indeed, we really need the references to the model object in a record object. Here is the goal of each of these fields:

I however removed the attribute columns, which gave a direct access to the columns of the model. This involved a duplication of the references to the column definition, which we now access through table.getColumns()

Cheers,