Skip to content

extra_fields in hasMany has changed from 2.0.11 to 2.0.12 #183

Closed

Description

@m13

It seems that my field "role" has disappeared from one version to another. My Model is the next one:

Class.hasMany('User', User, {
  role: { type: 'number', rational: false, require: true, defaultValue: 1 }}, {
  reverse: 'Class'
});

And when I retrieve the value I get different output:

Class.get(id, function(err, myElem) {
  if (err) return next(err);
  myElem.getUser(function(err, myUsers) {
    console.log(myUsers);
    ** more code **

Version 2.0.11 output

[ { User_id: [Getter/Setter],
    ** more values **
    photo: [Getter/Setter],
    extra: { role: [Getter/Setter] } } ]

Version 2.0.12 output

[ { User_id: [Getter/Setter],
    ** more values **
    photo: [Getter/Setter] } ]

Does anybody have the same problem?

Activity

  1. dresende commented on Jun 3, 2013

    @dresende
    Owner

    I have to look at it. There were made some changes right before publishing the new version. I think I know what it is.

  2. dresende commented on Jun 5, 2013

    @dresende
    Owner

    I released a new version so you can upgrade and avoid using git master.

  3. m13 commented on Jun 5, 2013

    @m13
    Author

    It works! Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions