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

Missing required 'schema.subSchema' option for Object editor #4

Closed
oori opened this issue Aug 16, 2012 · 9 comments
Closed

Missing required 'schema.subSchema' option for Object editor #4

oori opened this issue Aug 16, 2012 · 9 comments

Comments

@oori
Copy link
Contributor

oori commented Aug 16, 2012

Embeded Arrays (that are not 'ref') don't work properly. You can't add items.

For example: your Geo plugin example --> Create Address --> Click on + Meta Links
You'll get this error:
Uncaught Missing required 'schema.subSchema' option for Object editor backbone-forms.js:1271

I have the same issue with my own models.

Thanks for this great software!

@jspears
Copy link
Owner

jspears commented Aug 22, 2012

Thanks for reporting this, are you working from MASTER or from npm stuff? I worked on that problem for a while, and thought I had most variants of it worked out.

Sorry for the delayed response. I will take a look today if its in master, otherwise I might suggest checking out from master and see if that fixes it.

@oori
Copy link
Contributor Author

oori commented Aug 23, 2012

I'm working from the MASTER, not from NPM.

Thanks for your reply.

@jspears
Copy link
Owner

jspears commented Aug 23, 2012

Ok working on it now. Would it be big issue to goto express3 ?

Sent from my iPhone

On Aug 23, 2012, at 4:06 AM, oori notifications@github.com wrote:

I'm working from the MASTER, not from NPM.

Thanks for your reply.


Reply to this email directly or view it on GitHub.

@jspears jspears closed this as completed Aug 24, 2012
@jspears
Copy link
Owner

jspears commented Aug 24, 2012

I fixed it however a little suboptimally, now it may not work if you don't want a nested field to be shown. However that is a smaller bug than this. I am going to try to redo how I do the field selection, so that I return the whole model, with the unwanted fields deleted, rather than trying to create a parallel object copy with only the selected fields. This may or may not work, but it would be a lot easier to figure out. Let me know if it works for you. I tried to keep express2 compatibility but haven't done a lot of testing on it.

@oori
Copy link
Contributor Author

oori commented Aug 25, 2012

Thanks for the fix. I've checked it with two simple models and it works fine.
I need to do some further tests with a more complex nested model, and will update you here.

Going to Express 3 was not an issue, but upgrading to Mongoose 3 was a bit more pain.. but done..
Note, your last commit makes Mongoose 3 mandatory (otherwise, an error on load..)


There are however some bugs after these changes:

  1. Can not edit any model. Values are not loaded into the form.
    _2. {_v: 0} is added to any saved model in mongo db (UPDATE: forget about this one, my mistake - that's related with mongoose v3, added versioning)
    (I've validated these bugs on both my and your example models)

Smaller issues specific to your geo-location example:

  1. app.js: Need to require ../../../bobamo, and not bobamo (ie. git master, and not from npm)
  2. when saving Address in Geo-locaion example: Uncaught TypeError: Cannot read property 'Xa' of undefined, at map-editor:30

@jspears
Copy link
Owner

jspears commented Aug 25, 2012

Thanks! let me w how the testing goes. Really would like to hear what your using this for, don't get much feedback.

I'll work on the new issues this weekend.

-Justin

I'll try and fix the mongoose2 issue. Please open an issue.

Sent from my iPhone

On Aug 25, 2012, at 9:07 AM, oori notifications@github.com wrote:

Thanks for the fix. I've checked it with two simple models and it works fine.
I need to do some further tests with a more complex nested model, and will update you here.

Going to Express 3 was not an issue, but upgrading to Mongoose 3 was a bit more pain.. but done..
Note, your last commit makes Mongoose 3 mandatory (otherwise, an error on load..)

There are however some bugs after these changes:

  1. Can not edit any model. Values are not loaded into the form.
  2. {__v: 0} is added to any saved model in mongo db
    (I've validated these bugs on both my and your example models)

Smaller issues specific to your geo-location example:

  1. app.js: Need to require ../../../bobamo, and not bobamo (ie. git master, and not from npm)
  2. when saving Address in Geo-locaion example: Uncaught TypeError: Cannot read property 'Xa' of undefined, at map-editor:30


Reply to this email directly or view it on GitHub.

@jspears
Copy link
Owner

jspears commented Aug 25, 2012

So I just checked in a fix for the edit thing....

As far as the __v: its how mongoose3 keeps track of versions for optimistic
locking, or some attempt at optimistic locking.

I will fix the mongoose2 mers, which I believe shouldn't be too hard. I
think the only mongoose3'isms are
createConnection and findByIdAndRemove which should be pretty easy to
create a switch for.

-Justin

On Sat, Aug 25, 2012 at 11:35 AM, Justin Spears speajus@gmail.com wrote:

Thanks! let me w how the testing goes. Really would like to hear what your
using this for, don't get much feedback.

I'll work on the new issues this weekend.

-Justin

I'll try and fix the mongoose2 issue. Please open an issue.

Sent from my iPhone

On Aug 25, 2012, at 9:07 AM, oori notifications@github.com wrote:

Thanks for the fix. I've checked it with two simple models and it works
fine.
I need to do some further tests with a more complex nested model, and will
update you here.

Going to Express 3 was not an issue, but upgrading to Mongoose 3 was a bit
more pain.. but done..
Note, your last commit makes Mongoose 3 mandatory (*otherwise, an error

on load..*)

There are however some bugs after these changes:

  1. Can not edit any model. Values are not loaded into the form.
  2. {__v: 0} is added to any saved model in mongo db

(I've validated these bugs on both my and your example models)

Smaller issues specific to your geo-location example:

  1. app.js: Need to require ../../../bobamo, and not bobamo (ie. git
    master, and not from npm
    )
  2. when saving Address in Geo-locaion example: Uncaught TypeError:
    Cannot read property 'Xa' of undefined
    , at map-editor:30


Reply to this email directly or view it on GitHubhttps://github.com//issues/4#issuecomment-8023103.

@oori
Copy link
Contributor Author

oori commented Aug 25, 2012

Thanks for the 'no edit' fix.

I'm currently building on your bobamo for an administrative interface of an app (which I can not publicly expose at the moment..)
It's quite strange for me that to model my mongodb using mongoose, with strict rules, yet still required to write my own administrative front-end for that model... that's why I went for bobamo.
I know I may hit some blocks later on (user-level permissions...), but at this stage - I simply want to put most efforts on the main app, rather then on the admin-ui.
It's a bit of a shame that bobamo still doesn't get more users. it's in early stages, but there are plenty of real nice features built in to it!

Thanks for your efforts!

@jspears
Copy link
Owner

jspears commented Aug 26, 2012

Admin consoles are what I've used it for also thanks for sharing.

I am planning on adding data level user permissions in the not so distant future.

Sent from my iPhone

On Aug 25, 2012, at 6:39 PM, oori notifications@github.com wrote:

Thanks for the 'no edit' fix.

I'm currently building on your bobamo for an administrative interface of an app (which I can not publicly expose at the moment..)
It's quite strange for me that to model my mongodb using mongoose, with strict rules, yet still required to write my own administrative front-end for that model... that's why I went for bobamo.
I know I may hit some blocks later on (user-level permissions...), but at this stage - I simply want to put most efforts on the main app, rather then on the admin-ui.
It's a bit of a shame that bobamo still doesn't get more users. it's in early stages, but there are plenty of real nice features built in to it!

Thanks for your efforts!


Reply to this email directly or view it on GitHub.

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