persvr / perstore

CommonJS persistence/object storage based on W3C's object store API.
http://www.persvr.org/
96 stars 20 forks source link

`testMethodPermissive` is failing #21

Open neonstalwart opened 12 years ago

neonstalwart commented 12 years ago

the facet/model used for the permissive tests is created via the following code that uses an existing (Permissive) model as the appliesTo

var permissiveFacet = Permissive(model, {
    extraStaticMethod: function(){
        return 4;
    }
});

if permissiveFacet.get(1) is called, the object returned does not include the properties from the prototype of model.

i'm not sure what the correct behavior should be. if the schema for permissiveFacet has no prototype, is it supposed to use the prototype from the model facet? would the behavior be different for the Restrictive facet?

i'm thinking that for Permissive, if no prototype was provided by the new schema then use the existing prototype. for Restrictive, if no prototype was provided by the new schema use an empty prototype. is that right?