Open adyba opened 9 years ago
Hi adyba.
Nice that you have liked my code.
Be free to fork, make changes and submit a pull request. I will be glad with your contribution.
Thanks for the feedback. I will try to improve SEA with your tips. When I do it, I will let you know.
I don't really understand the mechanism of configuration SEA from outside via defSettings
, but I can still monkey-patch it ;) I'll do my best to create something like defSettings.masterKey
and to convince SEA to use its value instead of simple id
Hi again.
I have created a branch, called iss1.
It has some changes to suport the masterKey configuration.
You can configure it using provider:
dashboard.config(function ($seaModelProvider) {
$seaModelProvider.settings({
masterKey: 'my_master_key'
});
});
Or can set it on a single model:
return $seaModel.newModel({
name: 'Modelname',
masterKey: 'my_master_key',
fields: {...}
});
Each instance will get a 'my_master_key' attribute. 'id' is the default.
I Will keep it on branch until i do enough tests. It is not stable, so if you find some bugs, let me know.
I hope I have helped.
You are damn fast ;)) Looking forward to test it against https://github.com/baugarten/node-restful
I like the code!!! I have seen several ng-ORM's already and this one has the cleanest code-base ever. I have some minor objectives that would prevent me from using this on my projects. Basically those are not big changes in terms of logic or core of the code, but can make huge difference in terms of usability.
_id
, or Firebase$id
, CouchDB_id
again). The original POST call has no 'id' which is cool, but I'm not sure whether SEA recognizes downloaded MongoDB '_id' as a master_key property.new model
propertiesurl
andsettings
are bit messy or at least undocumented. The extrasettings
object that should somehow configure the ngResource is undocumented at all.url
is more a likeroute
andsettings.urlPrefix
is just evil clown