Method is not a function #34
Labels
No Label
bug
duplicate
enhancement
help wanted
invalid
question
wontfix
No Milestone
No project
No Assignees
1 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: thereadme/hapi-sequelize-crud#34
Loading…
Reference in New Issue
Block a user
No description provided.
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
I have 3 models:
Associations are:
The problems are:
/api/v1/product/1/category
route with{ "name": "Category 1" }
POST JSON dataand
/api/v1/product/1/price
route with{ "price": 10000 }
POST JSON datacreates method is not a function error
Maybe the getMethod function inside src/utils.js called from inside create function inside src/associations/one-to-one.js cannot find the correct method, so its returns false.
Or maybe i missed something on my setup?
Hi @labibramadhan If I understand you correctly, you're trying to create a new category that belongs to
product
withid=1
. That's not currently something we support. But I would be happy to look at a pull request that adds that functionality.In the meantime, you can always do:
POST /api/v1/category {"name": "Category 1", "productId": 1}
@joeybaker ah i see, exactly i was trying to test the features based on README.MD
We'd happily take a PR that updates the README