PSQLException relation does not exist. Active Objects

I am trying to save a relation between two objects. AT is an object that will have a Many to Many relationship with CT (which is an interface really, AT will actually have a relationship with with entities inheriting from CT, IT for example).

public interface AtToCt extends Entity {
    public AT getAT();
    public void setAT(AT at);
    public CT getCT();
    public void setCT(CT ct);
}

@Polymorphic
public interface CT extends Template {
    @ManyToMany(value = AtToCt.class)
    public AT[] getATs();
}

public interface AT extends Template {
    @ManyToMany(value = AtToCt.class)
    public CT[] getCTs();
}

public interface IT extends CT { }

@Polymorphic
public interface Template extends Entity { }


Here is the code saving the relation

 

final AtToCt atToct = ao.create(AtToCt.class);
atToct.setAT(at);
atToct.setCT(ct);
atToct.save();



The first line gives me an exception. The `ct` variable is an instance of `IT`. Both `at` and `ct` are valid entities taken from the database. `ao` is the ActiveObjects component from JIRA.

There was a SQL exception thrown by the Active Objects library:
Database:
- name:PostgreSQL
- version:9.4.11
- minor version:4
- major version:9
Driver:
- name:PostgreSQL Native Driver
- version:PostgreSQL 9.4.1212

org.postgresql.util.PSQLException: ERROR: relation "public.AO_C3F116_AT_TO_CT_ID_seq" does not exist
Position: 16

1 answer

0 vote

Hi Mathieu! For this kind of question, it would be better to submit it to our Developer Community. You can find them at community.developer.atlassian.com.

Hope this helps :)

Ana

Suggest an answer

Log in or Sign up to answer
How to earn badges on the Atlassian Community

How to earn badges on the Atlassian Community

Badges are a great way to show off community activity, whether you’re a newbie or a Champion.

Learn more
Community showcase
Published Jun 14, 2018 in Jira Service Desk

How the Telegram Integration for Jira helps Sergey's team take their support efficiency to the bank

...+ reading Fantasy). The same is true for him at the bank he works for: Efficiency is key when time literally equals money. Read on to learn how Sergey makes most of the time he has by...

424 views 2 4
Read article

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you