Hi there, is it possible to “include” something th...
# orm-help
e
Hi there, is it possible to “include” something that do not have a relationship to a query?
Copy code
const effects = await prisma.transactionEffect.findMany({
        where: {
            assetBalance: {
                wallet: {
                    id: wallet?.id,
                },
                asset: {
                    symbol: assetBalance?.asset?.symbol,
                },
            },
        },
        orderBy: {
            transaction: {
                blockNumber: 'desc',
            },
        },
        include: {
            transaction: true,
            // here I would like to include assetPrice
            // assetPrice has not a connection directly with transactionEffect
            // is it possible to include it even if there's not a releationship but I can say
            // load the price where assetId = XXX and timestamp = XYZ?
        },
    });
👀 1
n
Hi Emanuele 👋 Can you please share your schema file? I would like to understand the relation between
transactionEffect
and
assetPrice