Skip to content

Instantly share code, notes, and snippets.

@hns
Created October 15, 2010 19:56
Show Gist options
  • Save hns/628838 to your computer and use it in GitHub Desktop.
Save hns/628838 to your computer and use it in GitHub Desktop.
diff --git a/lib/ringo/storage/sql/mapping.js b/lib/ringo/storage/sql/mapping.js
index 21399db..3a3bccb 100644
--- a/lib/ringo/storage/sql/mapping.js
+++ b/lib/ringo/storage/sql/mapping.js
@@ -73,6 +73,9 @@ var Mapping = function(type, definition) {
for (var propName in definition.properties) {
var propDefinition = definition.properties[propName];
var propMapping = null;
+ if (typeof propDefinition === "string") {
+ propDefinition = {"type": propDefinition};
+ }
if (propDefinition.type === "object") {
propMapping = new ObjectMapping(this, propName, propDefinition);
} else if (propDefinition.type === "collection") {
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment