TypeError: attr[0].indexOf is not a functionUnable to create child instance for one-to-many on Sequelize.jsSequelize TypeError build.save is not a functionMany to many self reference in Sequelize in twitter like web-appTypeError: defineCall is not a function at Sequelize.importSequelize findOne error: TypeError indexOf undefinedSequelize not accepting valid moment.js object in where clauseCannot read property 'source' of undefined when trying to add association in queryGenerator.SelectQuery in Sequelize ORMModel.create with hasTrigger true return typeError attribute.type.toSql is not a functionDynamically add attributes to sequelize.js queryTypeError: UserModel.create is not a function, Sequelize

Upper Bound for a Sum

how to change dot to underline in multiple file-names?

Why is it to say 'paucis post diebus'?

Is there a command-line tool for converting html files to pdf?

How to increase Solr JVM memory

Why wasn't interlaced CRT scanning done back and forth?

Are valid inequalities worth the effort given modern solver preprocessing options?

The warlock of firetop mountain, what's the deal with reference 192?

Write The Shortest Program To Check If A Binary Tree Is Balanced

Variable doesn't parse as string

Does a humanoid possessed by a ghost register as undead to a paladin's Divine Sense?

Can a Sikh enter a buddhist temple with a turban?

How do the surviving Asgardians get to Earth?

Why is Heisenberg shown dead in Negro y Azul?

If someone else uploads my GPL'd code to Github without my permission, is that a copyright violation?

ZFS on Linux: Which mountpoint option when mounting manually per script?

“The Fourier transform cannot measure two phases at the same frequency.” Why not?

Is a switch from R to Python worth it?

Pronouns when writing from the point of view of a robot

Need reasons why a satellite network would not work

Would this winged human/angel be able to fly?

Piece de Resistance - Introduction & Ace and A's

Did Logical Positivism fail because it simply denied human emotion?

Repeated! Factorials!



TypeError: attr[0].indexOf is not a function


Unable to create child instance for one-to-many on Sequelize.jsSequelize TypeError build.save is not a functionMany to many self reference in Sequelize in twitter like web-appTypeError: defineCall is not a function at Sequelize.importSequelize findOne error: TypeError indexOf undefinedSequelize not accepting valid moment.js object in where clauseCannot read property 'source' of undefined when trying to add association in queryGenerator.SelectQuery in Sequelize ORMModel.create with hasTrigger true return typeError attribute.type.toSql is not a functionDynamically add attributes to sequelize.js queryTypeError: UserModel.create is not a function, Sequelize






.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty margin-bottom:0;








0















While querying through sequelize:



where["tenant_id"] = tenant_id;
where[datecheck] =
$gte: from,
$lte: to,
$ne: null
;
group = [ group_by + '_id' , "stage_type"];
attributes = [[group_by + '_id', 'id'], [group_by + '_name', 'group'], ["stage_type", 'type'], [ sequelize.literal('SUM(`stage_value`)'), 'count']];

Model.findAll(
attributes: attributes,
where: where,
group: group
);


I get this error:




Data TypeError: attr[0].indexOf is not a function



at attributes.map.attr (
sequelize/lib/dialects/abstract/query-generator.js:1244:28)











share|improve this question


























  • Can you share the raw query that is getting executed?

    – Rohit Dalal
    Mar 27 at 5:15











  • SELECT tenant_id AS id, tenant_name AS group, stage_type AS type, COUNT(candidate_id) AS count FROM funnel_reports AS funnel_reports WHERE funnel_reports.tenant_id = '10' AND (funnel_reports.stage_date >= '2018-05-31 18:30:00' AND funnel_reports.stage_date <= '2019-02-28 18:30:00') GROUP BY tenant_id, stage_type;

    – Pragna
    Mar 27 at 6:58











  • That query I want to run through sequelize but it is throwing an error. I am using sequelize 4.38.0 version

    – Pragna
    Mar 27 at 6:59

















0















While querying through sequelize:



where["tenant_id"] = tenant_id;
where[datecheck] =
$gte: from,
$lte: to,
$ne: null
;
group = [ group_by + '_id' , "stage_type"];
attributes = [[group_by + '_id', 'id'], [group_by + '_name', 'group'], ["stage_type", 'type'], [ sequelize.literal('SUM(`stage_value`)'), 'count']];

Model.findAll(
attributes: attributes,
where: where,
group: group
);


I get this error:




Data TypeError: attr[0].indexOf is not a function



at attributes.map.attr (
sequelize/lib/dialects/abstract/query-generator.js:1244:28)











share|improve this question


























  • Can you share the raw query that is getting executed?

    – Rohit Dalal
    Mar 27 at 5:15











  • SELECT tenant_id AS id, tenant_name AS group, stage_type AS type, COUNT(candidate_id) AS count FROM funnel_reports AS funnel_reports WHERE funnel_reports.tenant_id = '10' AND (funnel_reports.stage_date >= '2018-05-31 18:30:00' AND funnel_reports.stage_date <= '2019-02-28 18:30:00') GROUP BY tenant_id, stage_type;

    – Pragna
    Mar 27 at 6:58











  • That query I want to run through sequelize but it is throwing an error. I am using sequelize 4.38.0 version

    – Pragna
    Mar 27 at 6:59













0












0








0








While querying through sequelize:



where["tenant_id"] = tenant_id;
where[datecheck] =
$gte: from,
$lte: to,
$ne: null
;
group = [ group_by + '_id' , "stage_type"];
attributes = [[group_by + '_id', 'id'], [group_by + '_name', 'group'], ["stage_type", 'type'], [ sequelize.literal('SUM(`stage_value`)'), 'count']];

Model.findAll(
attributes: attributes,
where: where,
group: group
);


I get this error:




Data TypeError: attr[0].indexOf is not a function



at attributes.map.attr (
sequelize/lib/dialects/abstract/query-generator.js:1244:28)











share|improve this question
















While querying through sequelize:



where["tenant_id"] = tenant_id;
where[datecheck] =
$gte: from,
$lte: to,
$ne: null
;
group = [ group_by + '_id' , "stage_type"];
attributes = [[group_by + '_id', 'id'], [group_by + '_name', 'group'], ["stage_type", 'type'], [ sequelize.literal('SUM(`stage_value`)'), 'count']];

Model.findAll(
attributes: attributes,
where: where,
group: group
);


I get this error:




Data TypeError: attr[0].indexOf is not a function



at attributes.map.attr (
sequelize/lib/dialects/abstract/query-generator.js:1244:28)








sequelize.js






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Apr 1 at 20:07









marc_s

599k135 gold badges1149 silver badges1285 bronze badges




599k135 gold badges1149 silver badges1285 bronze badges










asked Mar 27 at 2:51









PragnaPragna

14 bronze badges




14 bronze badges















  • Can you share the raw query that is getting executed?

    – Rohit Dalal
    Mar 27 at 5:15











  • SELECT tenant_id AS id, tenant_name AS group, stage_type AS type, COUNT(candidate_id) AS count FROM funnel_reports AS funnel_reports WHERE funnel_reports.tenant_id = '10' AND (funnel_reports.stage_date >= '2018-05-31 18:30:00' AND funnel_reports.stage_date <= '2019-02-28 18:30:00') GROUP BY tenant_id, stage_type;

    – Pragna
    Mar 27 at 6:58











  • That query I want to run through sequelize but it is throwing an error. I am using sequelize 4.38.0 version

    – Pragna
    Mar 27 at 6:59

















  • Can you share the raw query that is getting executed?

    – Rohit Dalal
    Mar 27 at 5:15











  • SELECT tenant_id AS id, tenant_name AS group, stage_type AS type, COUNT(candidate_id) AS count FROM funnel_reports AS funnel_reports WHERE funnel_reports.tenant_id = '10' AND (funnel_reports.stage_date >= '2018-05-31 18:30:00' AND funnel_reports.stage_date <= '2019-02-28 18:30:00') GROUP BY tenant_id, stage_type;

    – Pragna
    Mar 27 at 6:58











  • That query I want to run through sequelize but it is throwing an error. I am using sequelize 4.38.0 version

    – Pragna
    Mar 27 at 6:59
















Can you share the raw query that is getting executed?

– Rohit Dalal
Mar 27 at 5:15





Can you share the raw query that is getting executed?

– Rohit Dalal
Mar 27 at 5:15













SELECT tenant_id AS id, tenant_name AS group, stage_type AS type, COUNT(candidate_id) AS count FROM funnel_reports AS funnel_reports WHERE funnel_reports.tenant_id = '10' AND (funnel_reports.stage_date >= '2018-05-31 18:30:00' AND funnel_reports.stage_date <= '2019-02-28 18:30:00') GROUP BY tenant_id, stage_type;

– Pragna
Mar 27 at 6:58





SELECT tenant_id AS id, tenant_name AS group, stage_type AS type, COUNT(candidate_id) AS count FROM funnel_reports AS funnel_reports WHERE funnel_reports.tenant_id = '10' AND (funnel_reports.stage_date >= '2018-05-31 18:30:00' AND funnel_reports.stage_date <= '2019-02-28 18:30:00') GROUP BY tenant_id, stage_type;

– Pragna
Mar 27 at 6:58













That query I want to run through sequelize but it is throwing an error. I am using sequelize 4.38.0 version

– Pragna
Mar 27 at 6:59





That query I want to run through sequelize but it is throwing an error. I am using sequelize 4.38.0 version

– Pragna
Mar 27 at 6:59












0






active

oldest

votes










Your Answer






StackExchange.ifUsing("editor", function ()
StackExchange.using("externalEditor", function ()
StackExchange.using("snippets", function ()
StackExchange.snippets.init();
);
);
, "code-snippets");

StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "1"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);

else
createEditor();

);

function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader:
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
,
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);



);













draft saved

draft discarded


















StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55369073%2ftypeerror-attr0-indexof-is-not-a-function%23new-answer', 'question_page');

);

Post as a guest















Required, but never shown

























0






active

oldest

votes








0






active

oldest

votes









active

oldest

votes






active

oldest

votes




Is this question similar to what you get asked at work? Learn more about asking and sharing private information with your coworkers using Stack Overflow for Teams.







Is this question similar to what you get asked at work? Learn more about asking and sharing private information with your coworkers using Stack Overflow for Teams.



















draft saved

draft discarded
















































Thanks for contributing an answer to Stack Overflow!


  • Please be sure to answer the question. Provide details and share your research!

But avoid


  • Asking for help, clarification, or responding to other answers.

  • Making statements based on opinion; back them up with references or personal experience.

To learn more, see our tips on writing great answers.




draft saved


draft discarded














StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55369073%2ftypeerror-attr0-indexof-is-not-a-function%23new-answer', 'question_page');

);

Post as a guest















Required, but never shown





















































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown

































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown







Popular posts from this blog

Kamusi Yaliyomo Aina za kamusi | Muundo wa kamusi | Faida za kamusi | Dhima ya picha katika kamusi | Marejeo | Tazama pia | Viungo vya nje | UrambazajiKuhusu kamusiGo-SwahiliWiki-KamusiKamusi ya Kiswahili na Kiingerezakuihariri na kuongeza habari

SQL error code 1064 with creating Laravel foreign keysForeign key constraints: When to use ON UPDATE and ON DELETEDropping column with foreign key Laravel error: General error: 1025 Error on renameLaravel SQL Can't create tableLaravel Migration foreign key errorLaravel php artisan migrate:refresh giving a syntax errorSQLSTATE[42S01]: Base table or view already exists or Base table or view already exists: 1050 Tableerror in migrating laravel file to xampp serverSyntax error or access violation: 1064:syntax to use near 'unsigned not null, modelName varchar(191) not null, title varchar(191) not nLaravel cannot create new table field in mysqlLaravel 5.7:Last migration creates table but is not registered in the migration table

은진 송씨 목차 역사 본관 분파 인물 조선 왕실과의 인척 관계 집성촌 항렬자 인구 같이 보기 각주 둘러보기 메뉴은진 송씨세종실록 149권, 지리지 충청도 공주목 은진현