You can change the query other way around and get the house details

prisma.user.findUnique({
  where: {
      uuid: <given userId>
  },
  include: {
    user: true
 }
})

This should provide you with House details.

If you want to query on house model, you would need to enable extendedWhereUnique preview feature and make sure to pass atleast one unique attribute in the where clause.

Answer from Nurul Sundarani on Stack Overflow
🌐
Prisma
prisma.io › home › prisma client api › prisma client api › prisma client api
Prisma Client API | Prisma Documentation
const userWithPosts = await prisma.user.findUnique({ where: { id: 1, }, include: { posts: { orderBy: { title: "desc", }, select: { title: true, published: true, }, }, }, });
Discussions

how to include results from a relation table in a findUnique() query from another table
For more details about our priorities and vision for the future of Prisma ORM, check out our latest blog post: https://www.prisma.io/blog/prisma-orm-manifesto. More on github.com
🌐 github.com
2
1
How to findUnique on a relation field in Prisma?
I'm using Prisma with Postgres and I have a schema something like model User { id Int @id @default(autoincrement()) uuid String @u... More on stackoverflow.com
🌐 stackoverflow.com
Prisma issue using include queries with extended methods
Hi, how's it going? I'm trying to create a findUniqueAndExists function to retrieve a record from my database. However, in many cases, I use include… More on reddit.com
🌐 r/nestjs
1
2
March 13, 2025
typescript - How to add type definitions for includes in a Prisma model? - Stack Overflow
The example in the documentation looks like this: const getUser = await prisma.user.findUnique({ where: { id: 1, }, include: { posts: { select: { title: true, }, ... More on stackoverflow.com
🌐 stackoverflow.com
🌐
Prisma
prisma.io › home › relation queries › relation queries › relation queries › relation queries
Relation queries (Concepts) | Prisma Documentation
const usersWithSomePosts = await prisma.user.findMany({ where: { posts: { some: {}, }, }, include: { posts: true, }, }); The fluent API lets you fluently traverse the relations of your models via function calls. Note that the last function call determines the return type of the entire query (the respective type annotations are added in the code snippets below to make that explicit). This query returns all Post records by a specific User: const postsByUser: Post[] = await prisma.user .findUnique({ where: { email: "alice@prisma.io" } }) .posts(); This is equivalent to the following findMany quer
🌐
GitHub
github.com › prisma › prisma › discussions › 4500
how to include results from a relation table in a findUnique() query from another table · prisma/prisma · Discussion #4500
const sheet = await prisma.sheet.findUnique({ where: { id: Number(id) }, include: { tema: true } }) const user_sheet= await prisma.user_sheet.findUnique({ where: { userId_sheetId: { userId: Number(fbid), sheetId: Number(id) } } })
Author   prisma
🌐
Prisma
prisma.io › home › crud › crud › crud › crud
CRUD (Reference) | Prisma Documentation
const user = await prisma.user.findUnique({ where: { email: "emma@prisma.io" }, select: { email: true, name: true }, }); // Returns: { email: 'emma@prisma.io', name: "Emma" } const users = await prisma.user.findMany({ where: { role: "ADMIN" }, include: { posts: true }, });
🌐
Paigeniedringhaus
paigeniedringhaus.com › blog › tips-and-tricks-for-using-the-prisma-orm
Tips and Tricks for Using the Prisma ORM | Paige Niedringhaus
We use Prisma’s standard findUnique ... and then inside of that findUnique() query, we add include: { fleets: true } to get all the fleet details that are related to that device....
🌐
DEV Community
dev.to › this-is-learning › its-prisma-time-select-3lie
It's Prisma Time - Select - DEV Community
January 11, 2022 - When we use the select option, Prisma returns an object that respects our selection, so the typescript compiler can detect the right fields of the objects. In this case the posts collection has this type · const posts: { id: number; title: string; content: string; }[] ... Ok let's go on and see the include option.
Find elsewhere
🌐
Reddit
reddit.com › r/nestjs › prisma issue using include queries with extended methods
r/nestjs on Reddit: Prisma issue using include queries with extended methods
March 13, 2025 - The issue I'm encountering is that TypeScript only recognizes the type of the first register and doesnt include what I need. ... async findUniqueAndExists<T>( this: T, args: Prisma.Args<T, 'findUnique'>, ): Promise< Prisma.Result<T, Prisma.Args<T, 'findUnique'>, 'findUnique'> > { const context = Prisma.getExtensionContext(this); const result = await (context as any).findUnique({ ...args, where: { ...args.where, deletedAt: null, }, }); return result; }, const user = await this.db.user.findUniqueAndExists({where:{id}, include:{role:true}}) return new UserDto(user) // <-- Error here because the UserDto expects the User & Role types
🌐
GitHub
github.com › prisma › prisma › issues › 14499
`limit` is gone when `findUnique` with include relation · Issue #14499 · prisma/prisma
July 26, 2022 - Bug description const result = await context.prisma.locale.findUniqueOrThrow({ where: { code: locale, }, include: { articles: { orderBy: { [args.orderBy]: args.order, }, take: 19, }, }, }) when using findUnique with include relation and ...
Author   prisma
🌐
Prisma
prisma.io › home › excluding fields › excluding fields › excluding fields › excluding fields
Excluding fields | Prisma Documentation
const user = await prisma.user.findUnique({ where: { id: 1 }, omit: { password: true, }, }); ... Use select when you want to return only a small subset of fields. Use omit when the default result is mostly correct and you only want to remove a few sensitive or noisy fields. ... Learn how to return only the fields and relations you need with select and include in Prisma Client.
🌐
GitHub
github.com › prisma › prisma › issues › 10903
findUnique return type does not include null · Issue #10903 · prisma/prisma
December 29, 2021 - The docs say findUnique can return zero or one items that match a query. The issue is that the Typescript return type of findUnique is simply a promise of an instance of the model you are querying and does not account for when there isn't a ...
Author   prisma
🌐
GitHub
github.com › prisma › prisma › issues › 3697
Replace `findOne` with `findUnique` · Issue #3697 · prisma/prisma
September 18, 2020 - You can use the select and include options to determine which properties should be included on the returned object. prisma.users.findOne({ where: { email: "alice@prisma.io" } }) Many people have been confused by this.
Author   prisma
🌐
Prisma
prisma.io › home › select fields › select fields › select fields › select fields
Select fields | Prisma Documentation
Learn how to use select and include in Prisma Client to return only the fields and relations you need.
🌐
Prisma
prisma.io › home › relations › relations › relations › relations
Relations | Prisma Documentation
const getAuthor = await prisma.user.findUnique({ where: { id: "20" }, include: { posts: true }, });
🌐
Medium
medium.com › @enayetflweb › organising-find-operations-in-prisma-with-typescript-8ef06ee53cce
Organising Find Operations in Prisma with TypeScript | by Md Enayetur Rahman | Medium
October 26, 2024 - Important Note on findUnique and findUniqueOrThrow · In Prisma, findUnique and findUniqueOrThrow can only be used with columns that are unique, like id. Non-unique columns, such as title, content, or authorName, cannot be used with findUnique since these fields may have duplicate values across records.
🌐
DEV Community
dev.to › kristenkinnearohlmann › basic-find-query-with-prisma-3hcb
Basic Find Query with Prisma - DEV Community
March 21, 2022 - const qry = <GUID value> const data = await prisma.user.findUnique({ where: { id: qry, }, select: { id: true, username: true, email: true, firstName: true, lastName: true }, }); For the final returned object, I spread the data object to include a message to confirm the data returned to my route, since this is currently the same data that the session contains:
🌐
npm
npmjs.com › package › @giraphql › plugin-prisma
@giraphql/plugin-prisma - npm
December 15, 2021 - If used it works like a combination of the resolve method of relation and prismaConnection. The default will use the findUnique of the current model, with an include for the current relation.
      » npm install @giraphql/plugin-prisma
    
Published   Dec 15, 2021
Version   0.14.0
Author   Michael Hayes