prisma-client-rust icon indicating copy to clipboard operation
prisma-client-rust copied to clipboard

select! and include! from different crate

Open fedeci opened this issue 8 months ago • 1 comments

Hi! Currently select! and include! macros can only me used within the same crate. What do you thing about allowing to define a global crate path?

// schema.prisma
generator client {
  provider    = "cargo prisma"
  output      = "../pg/src/prisma.rs"
  module_path = "pg::prisma"
  same_crate_module = false // defaults to true to be non-breaking
}

The previous links the pg::prisma module to the macros. When same_crate_module is true or it is not set, it links crate::pg::prisma.

fedeci avatar Oct 07 '23 17:10 fedeci

This isn't a problem on main, as I use $crate. I may consider backporting it to 0.6.

Brendonovich avatar Oct 08 '23 03:10 Brendonovich