Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unique and key constraints blocks certain valid writes #6974

Open
james-whiteside opened this issue Jan 26, 2024 · 0 comments
Open

Unique and key constraints blocks certain valid writes #6974

james-whiteside opened this issue Jan 26, 2024 · 0 comments

Comments

@james-whiteside
Copy link
Member

Description

When inserting two ownerships of the same unique or key attribute by the same owner, TypeDB throws an error. This should not be the case as attribute idempotency will ensure that the data that is actually written does not violate the constraint.

Environment

  1. TypeDB distribution: Core
  2. TypeDB version: ef289da
  3. Environment: MacOS
  4. Client and version: Studio b44218f

Reproducible Steps

  1. Run:
define
person sub entity;
person owns id @key;
person owns email @unique;
person owns name;
id sub attribute, value string;
email sub attribute, value string;
name sub attribute, value string;
  1. Run:
insert
$p3 isa person, has id "p3", has id "p3", has email "p3", has email "p3";

Expected result

TypeDB identifies that data write query will not violate @unique constraint on email, or the @key constraint on id.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants