Active Objects - relationship with User object

b
Contributor
April 2, 2012

Hi,

I'm trying to define onetomany relationship between my custom model and user. Is that possible to define something like that, because User doesn't extends Entity? Do I have to extend User class?

2 answers

1 accepted

4 votes
Answer accepted
Samuel Le Berrigaud
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
April 3, 2012

The Active Objects data model cannot be linked (via foreign keys or otherwise) the JIRA data model. Active Objects plugin databases are sandboxed on purpose.

If you need to refer to the User object in JIRA, you should consider storing the user ID or username in your Active Objects entity.

Zafer Cakmak February 9, 2015

How should we deal with the change of username? What becomes to the relations if user changes its username?

SeriousDen
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
April 20, 2015
0 votes
Mizan
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
April 2, 2012

Are you trying store a user object in your entity ?

b
Contributor
April 2, 2012

No, I want to store just relationship

Mizan
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
April 2, 2012

Assuming there are two entities you can refer this document .

Suggest an answer

Log in or Sign up to answer