Skip to content

Commit

Permalink
camel cased udts not handled properly, fixes #68
Browse files Browse the repository at this point in the history
  • Loading branch information
masumsoft committed Sep 2, 2016
1 parent 05ca08f commit eaaafa3
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions src/orm/apollo.js
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@ Apollo.prototype = {
let query = util.format(
"SELECT * FROM system_schema.types WHERE keyspace_name = '%s' AND type_name = '%s';",
keyspace,
udtKey.toLowerCase()
udtKey
);
client.execute(query, (err, result) => {
if (err) {
Expand All @@ -176,7 +176,7 @@ Apollo.prototype = {
));
});
query = util.format(
'CREATE TYPE IF NOT EXISTS %s (%s);',
'CREATE TYPE IF NOT EXISTS "%s" (%s);',
udtKey,
udtFields.toString()
);
Expand Down
4 changes: 2 additions & 2 deletions test/models/PersonModel.js
Original file line number Diff line number Diff line change
Expand Up @@ -95,11 +95,11 @@ module.exports = {
emails: { type: 'set', typeDef: '<varchar>' },
address: {
type: 'frozen',
typeDef: '<address>',
typeDef: '<"Address">',
},
frozenMap: {
type: 'frozen',
typeDef: '<map <text, frozen<address>>>',
typeDef: '<map <text, frozen<"Address">>>',
},
points: {
type: 'double',
Expand Down
2 changes: 1 addition & 1 deletion test/test.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ describe('Unit Tests', () => {
phone_number: 'text',
country_code: 'int',
},
address: {
Address: {
street: 'text',
city: 'text',
state: 'text',
Expand Down

0 comments on commit eaaafa3

Please sign in to comment.