Dot notation in MongoDB InsertOneMongoDB or CouchDB - fit for production?When to use MongoDB or other document oriented database systems?MongoDB vs. CassandraHow to query MongoDB with “like”?Delete everything in a MongoDB databaseMongoDB relationships: embed or reference?When to Redis? When to MongoDB?How do I drop a MongoDB database from the command line?Pretty print in MongoDB shell as defaultWhen to use CouchDB over MongoDB and vice versa
Installing PowerShell on 32-bit Kali OS fails
Can somebody explain Brexit in a few child-proof sentences?
Can I create an upright 7-foot × 5-foot wall with the Minor Illusion spell?
How to prevent YouTube from showing already watched videos?
How can I raise concerns with a new DM about XP splitting?
Did US corporations pay demonstrators in the German demonstrations against article 13?
Science Fiction story where a man invents a machine that can help him watch history unfold
Pronouncing Homer as in modern Greek
What (else) happened July 1st 1858 in London?
Books on the History of math research at European universities
Is exact Kanji stroke length important?
Is there any significance to the Valyrian Stone vault door of Qarth?
Why are all the doors on Ferenginar (the Ferengi home world) far shorter than the average Ferengi?
Can the harmonic series explain the origin of the major scale?
Lifted its hind leg on or lifted its hind leg towards?
Can a Bard use an arcane focus?
Are taller landing gear bad for aircraft, particulary large airliners?
Freedom of speech and where it applies
Is there a problem with hiding "forgot password" until it's needed?
What do you call the infoboxes with text and sometimes images on the side of a page we find in textbooks?
Why is delta-v is the most useful quantity for planning space travel?
Is it okay / does it make sense for another player to join a running game of Munchkin?
Why does this part of the Space Shuttle launch pad seem to be floating in air?
How will losing mobility of one hand affect my career as a programmer?
Dot notation in MongoDB InsertOne
MongoDB or CouchDB - fit for production?When to use MongoDB or other document oriented database systems?MongoDB vs. CassandraHow to query MongoDB with “like”?Delete everything in a MongoDB databaseMongoDB relationships: embed or reference?When to Redis? When to MongoDB?How do I drop a MongoDB database from the command line?Pretty print in MongoDB shell as defaultWhen to use CouchDB over MongoDB and vice versa
While performing InsertOne in MongoDB (4.0.5) from PHP I get the following exception:
[0] Detected unsupported PHP type for field path "context.trace.1.args.2": 7
According to the MongoDB documentation one is allowed to use dot notation in update commands. The doc however talks about this fact with $set
as context.
It seems to me that a simple Update does not allow for dot notation. (just guessing)
Can someone explain the nuance/edge cases here?
===== follow up on request:
The document is created by Monolog.
And the document used in InsertOne
looks like the following:
Array
(
[message] => file_get_contents( ...obfuscated... ): failed to open stream: Connection timed out
[context] => Array
(
[code] => 2
[file] => ...obfuscated...
[line] => 127
[trace] => Array
(
[0] => Array
(
[function] => handleError
[class] => WhoopsRun
[type] => ->
...obfuscated...
)
[1] => Array
(
[function] => file_get_contents
[args] => Array
(
[0] => https:// ...obfuscated...
[1] =>
[2] => 0
)
)
[2] => Array
(
[file] => ...obfuscated... .php
[line] => 127
[function] => file_get_contents
[args] => Array
(
[0] => https:// ...obfuscated...
)
)
[3] => Array
(
[file] => ...obfuscated... .php
[line] => 91
[args] => Array
(
[0] => ...obfuscated... .php
)
[function] => require_once
)
)
[notThrown] => 1
[type] => WhoopsExceptionErrorException
)
[level] => 500
[level_name] => CRITICAL
[channel] => ...obfuscated...
[datetime] => MongoDBBSONUTCDateTime Object
(
[milliseconds] => 1551951362000
)
[extra] => Array
(
[cli] => Array
(
[user] => ...obfuscated...
[script] => ...obfuscated... .php
[argv] => Array
(
[0] => ...obfuscated...
)
)
[server_name] => ...obfuscated...
[server_ip] => ...obfuscated...
[process_id] => 3273
[memory_peak_usage] => 5.75 MB
[memory_usage] => 5.75 MB
[git] => Array
(
[ ...obfuscated... ] => Array
(
[branch] => ...obfuscated...
[commit] => ...obfuscated...
)
[publisher] => Array
(
[branch] => ...obfuscated...
[commit] => ...obfuscated...
)
)
)
[server_name] => ...obfuscated...
[_id] => MongoDBBSONObjectId Object
(
[oid] => 5c81e6029caba40cc96bd831
)
)
I suspect Neil Lunn already answers the question.
But now I wonder whether this is a shortcoming of Monolog or not. And what approach to take to solve this issue.
mongodb insert mongodb4.0
add a comment |
While performing InsertOne in MongoDB (4.0.5) from PHP I get the following exception:
[0] Detected unsupported PHP type for field path "context.trace.1.args.2": 7
According to the MongoDB documentation one is allowed to use dot notation in update commands. The doc however talks about this fact with $set
as context.
It seems to me that a simple Update does not allow for dot notation. (just guessing)
Can someone explain the nuance/edge cases here?
===== follow up on request:
The document is created by Monolog.
And the document used in InsertOne
looks like the following:
Array
(
[message] => file_get_contents( ...obfuscated... ): failed to open stream: Connection timed out
[context] => Array
(
[code] => 2
[file] => ...obfuscated...
[line] => 127
[trace] => Array
(
[0] => Array
(
[function] => handleError
[class] => WhoopsRun
[type] => ->
...obfuscated...
)
[1] => Array
(
[function] => file_get_contents
[args] => Array
(
[0] => https:// ...obfuscated...
[1] =>
[2] => 0
)
)
[2] => Array
(
[file] => ...obfuscated... .php
[line] => 127
[function] => file_get_contents
[args] => Array
(
[0] => https:// ...obfuscated...
)
)
[3] => Array
(
[file] => ...obfuscated... .php
[line] => 91
[args] => Array
(
[0] => ...obfuscated... .php
)
[function] => require_once
)
)
[notThrown] => 1
[type] => WhoopsExceptionErrorException
)
[level] => 500
[level_name] => CRITICAL
[channel] => ...obfuscated...
[datetime] => MongoDBBSONUTCDateTime Object
(
[milliseconds] => 1551951362000
)
[extra] => Array
(
[cli] => Array
(
[user] => ...obfuscated...
[script] => ...obfuscated... .php
[argv] => Array
(
[0] => ...obfuscated...
)
)
[server_name] => ...obfuscated...
[server_ip] => ...obfuscated...
[process_id] => 3273
[memory_peak_usage] => 5.75 MB
[memory_usage] => 5.75 MB
[git] => Array
(
[ ...obfuscated... ] => Array
(
[branch] => ...obfuscated...
[commit] => ...obfuscated...
)
[publisher] => Array
(
[branch] => ...obfuscated...
[commit] => ...obfuscated...
)
)
)
[server_name] => ...obfuscated...
[_id] => MongoDBBSONObjectId Object
(
[oid] => 5c81e6029caba40cc96bd831
)
)
I suspect Neil Lunn already answers the question.
But now I wonder whether this is a shortcoming of Monolog or not. And what approach to take to solve this issue.
mongodb insert mongodb4.0
Please show the query you're trying to execute.
– deceze♦
Mar 7 at 10:19
1
From the use of index positions in that path I presume you are attempting to "push" into an array.insertOne()
actually "creates documents", and hence you cannot use a "dotted path name".
– Neil Lunn
Mar 7 at 10:27
@deceze I've follewed up on your request
– Bart Gloudemans
Mar 7 at 11:38
add a comment |
While performing InsertOne in MongoDB (4.0.5) from PHP I get the following exception:
[0] Detected unsupported PHP type for field path "context.trace.1.args.2": 7
According to the MongoDB documentation one is allowed to use dot notation in update commands. The doc however talks about this fact with $set
as context.
It seems to me that a simple Update does not allow for dot notation. (just guessing)
Can someone explain the nuance/edge cases here?
===== follow up on request:
The document is created by Monolog.
And the document used in InsertOne
looks like the following:
Array
(
[message] => file_get_contents( ...obfuscated... ): failed to open stream: Connection timed out
[context] => Array
(
[code] => 2
[file] => ...obfuscated...
[line] => 127
[trace] => Array
(
[0] => Array
(
[function] => handleError
[class] => WhoopsRun
[type] => ->
...obfuscated...
)
[1] => Array
(
[function] => file_get_contents
[args] => Array
(
[0] => https:// ...obfuscated...
[1] =>
[2] => 0
)
)
[2] => Array
(
[file] => ...obfuscated... .php
[line] => 127
[function] => file_get_contents
[args] => Array
(
[0] => https:// ...obfuscated...
)
)
[3] => Array
(
[file] => ...obfuscated... .php
[line] => 91
[args] => Array
(
[0] => ...obfuscated... .php
)
[function] => require_once
)
)
[notThrown] => 1
[type] => WhoopsExceptionErrorException
)
[level] => 500
[level_name] => CRITICAL
[channel] => ...obfuscated...
[datetime] => MongoDBBSONUTCDateTime Object
(
[milliseconds] => 1551951362000
)
[extra] => Array
(
[cli] => Array
(
[user] => ...obfuscated...
[script] => ...obfuscated... .php
[argv] => Array
(
[0] => ...obfuscated...
)
)
[server_name] => ...obfuscated...
[server_ip] => ...obfuscated...
[process_id] => 3273
[memory_peak_usage] => 5.75 MB
[memory_usage] => 5.75 MB
[git] => Array
(
[ ...obfuscated... ] => Array
(
[branch] => ...obfuscated...
[commit] => ...obfuscated...
)
[publisher] => Array
(
[branch] => ...obfuscated...
[commit] => ...obfuscated...
)
)
)
[server_name] => ...obfuscated...
[_id] => MongoDBBSONObjectId Object
(
[oid] => 5c81e6029caba40cc96bd831
)
)
I suspect Neil Lunn already answers the question.
But now I wonder whether this is a shortcoming of Monolog or not. And what approach to take to solve this issue.
mongodb insert mongodb4.0
While performing InsertOne in MongoDB (4.0.5) from PHP I get the following exception:
[0] Detected unsupported PHP type for field path "context.trace.1.args.2": 7
According to the MongoDB documentation one is allowed to use dot notation in update commands. The doc however talks about this fact with $set
as context.
It seems to me that a simple Update does not allow for dot notation. (just guessing)
Can someone explain the nuance/edge cases here?
===== follow up on request:
The document is created by Monolog.
And the document used in InsertOne
looks like the following:
Array
(
[message] => file_get_contents( ...obfuscated... ): failed to open stream: Connection timed out
[context] => Array
(
[code] => 2
[file] => ...obfuscated...
[line] => 127
[trace] => Array
(
[0] => Array
(
[function] => handleError
[class] => WhoopsRun
[type] => ->
...obfuscated...
)
[1] => Array
(
[function] => file_get_contents
[args] => Array
(
[0] => https:// ...obfuscated...
[1] =>
[2] => 0
)
)
[2] => Array
(
[file] => ...obfuscated... .php
[line] => 127
[function] => file_get_contents
[args] => Array
(
[0] => https:// ...obfuscated...
)
)
[3] => Array
(
[file] => ...obfuscated... .php
[line] => 91
[args] => Array
(
[0] => ...obfuscated... .php
)
[function] => require_once
)
)
[notThrown] => 1
[type] => WhoopsExceptionErrorException
)
[level] => 500
[level_name] => CRITICAL
[channel] => ...obfuscated...
[datetime] => MongoDBBSONUTCDateTime Object
(
[milliseconds] => 1551951362000
)
[extra] => Array
(
[cli] => Array
(
[user] => ...obfuscated...
[script] => ...obfuscated... .php
[argv] => Array
(
[0] => ...obfuscated...
)
)
[server_name] => ...obfuscated...
[server_ip] => ...obfuscated...
[process_id] => 3273
[memory_peak_usage] => 5.75 MB
[memory_usage] => 5.75 MB
[git] => Array
(
[ ...obfuscated... ] => Array
(
[branch] => ...obfuscated...
[commit] => ...obfuscated...
)
[publisher] => Array
(
[branch] => ...obfuscated...
[commit] => ...obfuscated...
)
)
)
[server_name] => ...obfuscated...
[_id] => MongoDBBSONObjectId Object
(
[oid] => 5c81e6029caba40cc96bd831
)
)
I suspect Neil Lunn already answers the question.
But now I wonder whether this is a shortcoming of Monolog or not. And what approach to take to solve this issue.
mongodb insert mongodb4.0
mongodb insert mongodb4.0
edited Mar 7 at 11:37
Bart Gloudemans
asked Mar 7 at 10:16
Bart GloudemansBart Gloudemans
661524
661524
Please show the query you're trying to execute.
– deceze♦
Mar 7 at 10:19
1
From the use of index positions in that path I presume you are attempting to "push" into an array.insertOne()
actually "creates documents", and hence you cannot use a "dotted path name".
– Neil Lunn
Mar 7 at 10:27
@deceze I've follewed up on your request
– Bart Gloudemans
Mar 7 at 11:38
add a comment |
Please show the query you're trying to execute.
– deceze♦
Mar 7 at 10:19
1
From the use of index positions in that path I presume you are attempting to "push" into an array.insertOne()
actually "creates documents", and hence you cannot use a "dotted path name".
– Neil Lunn
Mar 7 at 10:27
@deceze I've follewed up on your request
– Bart Gloudemans
Mar 7 at 11:38
Please show the query you're trying to execute.
– deceze♦
Mar 7 at 10:19
Please show the query you're trying to execute.
– deceze♦
Mar 7 at 10:19
1
1
From the use of index positions in that path I presume you are attempting to "push" into an array.
insertOne()
actually "creates documents", and hence you cannot use a "dotted path name".– Neil Lunn
Mar 7 at 10:27
From the use of index positions in that path I presume you are attempting to "push" into an array.
insertOne()
actually "creates documents", and hence you cannot use a "dotted path name".– Neil Lunn
Mar 7 at 10:27
@deceze I've follewed up on your request
– Bart Gloudemans
Mar 7 at 11:38
@deceze I've follewed up on your request
– Bart Gloudemans
Mar 7 at 11:38
add a comment |
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
);
);
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55041263%2fdot-notation-in-mongodb-insertone%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
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.
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55041263%2fdot-notation-in-mongodb-insertone%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
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
Please show the query you're trying to execute.
– deceze♦
Mar 7 at 10:19
1
From the use of index positions in that path I presume you are attempting to "push" into an array.
insertOne()
actually "creates documents", and hence you cannot use a "dotted path name".– Neil Lunn
Mar 7 at 10:27
@deceze I've follewed up on your request
– Bart Gloudemans
Mar 7 at 11:38