I am porting existing JIRA connect plugin to server architecture. In connect, i was using mysql database with jdbc connection.
1> Can i directly use connect's mysql database in server plugin?
2> If not, then i am fine with Active Object too. But i am not getting exact detailed documentation on active objects. (How to create combo unique key, Joins between tables).
Server plugins should use Active Objects to store data - this is the recommended approach. If for some reason AO does not work for you you can always connect to other database, but this makes things a lot more complicated - for example:
Here're some useful guides on Active Objects
https://developer.atlassian.com/docs/atlassian-platform-common-components/active-objects
And about the JOINS
This should give you all the details on the annoations for primary keys, unique keys, etc..
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
@Boris Georgiev Thanks Boris. Actually i checked all above links but not getting any good example for how to add combo unique key, On DELETE cascade on foreign key, add procedures and triggers in active objects.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
@Boris Georgiev [Botron] : Thanks Boris. I think yes i need to do everything using JAVA now. I wanted to reuse connect plugin code as much as i can in server plugin.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Yes, as long as it's not the JIRA database - you must never write to a JIRA database directly.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You can't use the database in Connect either, so I'm not sure what you're doing. I'd assumed you were reading an external database and your addon will continue to do that.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
@Nic Brough [Adaptavist] : yes you are right. In case of connect i am using external database. But in server plugin, i don't want to use external database. I want to port that external database in JIRA itself through active objects.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Ah, good, I did understand it correctly then! Thanks! Boris has beaten me to all the links I'd recommend.
The only thing I'd add is that you should stop thinking about doing things at a database level (forget triggers and keys etc) - you need to use the functions for handling AO as documented in Boris' links.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.