question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

MongoDB Introspection Multiple Types warning message in CLI output does not differentiate models and embedded documents

See original GitHub issue
// The following fields had data stored in multiple types. The most common type was chosen. If loading data with a type that does not match the one in the data model, the client will crash. Please see the issue: https://github.com/prisma/prisma/issues/9654
// - Model "MoviesImdb", field: "rating", chosen data type: "Double"
// - Model "MoviesImdb", field: "votes", chosen data type: "Int32"

Actual affected type not model:

type MoviesImdb {
  id_    Int   @map("id")
  /// Multiple data types found: String: 0.1%, Double: 99.9% out of 1000 sampled entries
  rating Float
  /// Multiple data types found: String: 0.1%, Int32: 99.9% out of 1000 sampled entries
  votes  Int
}

via https://github.com/prisma/introspection-ci/commit/d52f2907214e969ab7720f40790e3f0633d3d322#diff-e53417a3309dc6c499451c73ca81cb52af9a635a3c2796494a18343f2be97890

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:5 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
pimeyscommented, Feb 4, 2022

I think the js side prints the message out of this data. I’d say if the data holds compositeType field, print:

- Type "MoviesImdb", field: "rating", chosen data type: "Double"

Otherwise

- Model "MoviesImdb", field: "rating", chosen data type: "Double"
0reactions
Jolg42commented, Feb 4, 2022

Comment from Julius

This can also trigger warnings, they come in the same form as with the issue I’m commenting here https://github.com/prisma/prisma-engines/pull/2651 so probably a good idea to check too

Read more comments on GitHub >

github_iconTop Results From Across the Web

Prisma 3.10.0 Release - GitClear
We're super excited to announce that Prisma version 3.10.0 supports reading and modifying embedded documents. Embedded documents will provide ...
Read more >
Monitoring Database Systems — MongoDB Manual
This document provides an overview of the available tools and data provided by MongoDB as well as an introduction to diagnostic strategies, and...
Read more >
Spring Data MongoDB - Reference Documentation
This document is the reference guide for Spring Data - MongoDB Support. ... Asynchronous queries differ from reactive queries and should not be...
Read more >
Table of Contents - Micronaut Documentation
Micronaut is a modern, JVM-based, full stack Java framework designed for building modular, easily testable JVM applications with support for Java, Kotlin, and ......
Read more >
Node.js v19.3.0 Documentation
Warning : binding inspector to a public IP:port combination is insecure ... AsyncHook does not explicitly distinguish between these different cases but will ......
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found