Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
rblalock opened this issue Aug 3, 2011 · 1 comment
Closed

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

rblalock opened this issue Aug 3, 2011 · 1 comment

Comments

@rblalock
Copy link
Contributor

rblalock commented Aug 3, 2011

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
Copy link
Owner

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:

  • _data: holds the values of the different fields of the record
  • table: the name of the table associated to this model

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,

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants