Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Another field changes type #2105

Unanswered
bgencacat asked this question in General
Discussion options

  • Laravel-mongodb Version: dev-develop
  • PHP Version: 7.4
  • Laravel: 7.28.2

Description:

When I update gadget <Document>, even if I not set balloon being converted from <Document> to [Array]

{
 balloon: {},
 gadget: {
 "gadget-paintballgun": NumberInt("40"),
 "gadget-batblaster": NumberInt("30"),
 "gadget-woolfountain": NumberInt("30"),
 "gadget-firework": NumberInt("40"),
 "gadget-kaanumayparty": NumberInt("20"),
 "gadget-hook": NumberInt("20"),
 "gadget-blockcannon": NumberInt("30"),
 "gadget-explodingsheep": NumberInt("30"),
 "gadget-enderpearlbus": NumberInt("20"),
 "gadget-waterwave": NumberInt("10"),
 "gadget-firewhip": NumberInt("10")
 }
}

This is how I update
$user->globalPlayer[$gadget] += $amount;

I dont want to change type of empty "balloon" document. What should I do? (It does it to all empty <Document>s)

Thank you.

You must be logged in to vote

Replies: 0 comments

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
1 participant
Converted from issue

This discussion was converted from issue #2105 on September 18, 2020 15:22.

AltStyle によって変換されたページ (->オリジナル) /