Closed AlexisWilke closed 5 years ago
@AlexisWilke Could you please share your schema or atleast the type definition of content_id? I guess that would help me sort out the issue properly.
The following ought to do it;
module.exports = {
fields: {
content_id: 'long'
},
key: ['content_id']
}
The problem is when you use an invalid type. Reading various documentations, I though express-cassandra would also make use of non CQL types where a bigint
would be represented by long
. My mistake, but the fact is that as a side effect I found this bug.
There is also the word "default" which is misspelled in the same file.
'Invalid defult value for field: %s(%s)'
Currently on line 48. (the 'a' is missing)
Okay, nice catch @AlexisWilke, I'm going to merge it then.
Note that the word default is not fixed in the patch...
Yah I've added another commit for that.
I decided to try to create a Pull request, So I'll close #182
I'm starting with express-cassandra and I got the following error
Looking at the code I see that the type can either be a field or a string;
However, in the code generating the error:
I suggest changing the
fieldObject.type
withfieldtype
as follow:Then I can see that it's not happen with 'long' as a field type:
Which is strange, but at least makes a lot more sense.