Jadpo is experimental and not ready for production. These docs follow the compiler's main branch as of 29 Nov 2026. What's built · Install 0.6.0
jadpo
ReferenceErrors

ErrorsPersonal data · rule

data.lookup_not_unique

On this page

Code looks a record up by an email field that isn't unique: true across the whole table, so an address could find several.

Area 15, Personal data; not declinable; the next step is usually the human's.

Why Jadpo refuses it

A lookup gives one record or none. If several records could hold one address, which came back would show more than one person's. So the field must be unique: true, and its entity one every tenant shares: a tenant's unique rule holds only within the tenant, so two tenants' records may hold the same address.

What it looks like

main.jadpo:

example
principal {    user: {        subject: Member.handle    }}authentication {    api_token: {}}policy {    actions: {        has_account: [Access.authenticated]    }}type Handle = Text {    max_length: 40}type AddressStanding = Enum {    account_held    no_account}entity Member {    id: Uuid    handle: Handle {        unique: true    }    email: Email    policy: {        create: [Access.public]        read: [id]    }}/// Whether an address has an account.action has_account(email: Member.email) -> AddressStanding {    match Member.lookup(email: email) {        none -> {            return AddressStanding.no_account        }        some -> {            return AddressStanding.account_held        }    }}
jadpo checkcheck failed: 1 error, 1 file

error Member.lookup finds by email, which isn't unique: true

--> main.jadpo:41:25

   |41 |     match Member.lookup(email: email) {   |                         ^^^^^ not unique
reason
A lookup gives one record or none. Without unique: true several Member records could hold one address, and which came back would show more than one person's.
next
Make Member.email unique: true, if one address is one person's (human)
rule
data.lookup_not_unique
help
https://jadpo.dev/docs/errors/data.lookup_not_unique

(human) at the end of the next: line tells your coding agent to stop and ask you which fix you want, because the choice is yours to make: it decides whether two of your records may share an address.

How to fix it

If one address is one person's, make the field unique: true:

example
    email: Email {        unique: true    }

Two members can no longer share an address, and the lookup finds the one who has it, or none.

Markdown for agents: /docs/errors/data.lookup_not_unique.md.Built from Jadpo's main branch at commit 9080dc3.