ActiveObjects table not getting created

Hi,
I have a Jira plugin in which I am trying to create an AO table.
I have the interface like so -

package path.to;

import net.java.ao.Entity;
import net.java.ao.schema.StringLength;


public interface TempTablesTg extends Entity {
    String getTableId();
	
	void setTableId(String tableId);
	
	@StringLength(StringLength.UNLIMITED)
	String getData();
	
	void setData(String data);
}

Inside atlassian-plugin.xml -

<ao key="temp-tables-tg">
		<description>some description
		</description>
		<entity>path.to.TempTablesTg</entity>
	</ao>

When I install this plugin, this table doesn’t get created. Why?

Try writing to it. I.e. creating TempTablesTg objects and storing them. If I recall correctly, AO tables are created lazily, on first write.

From https://developer.atlassian.com/server/jira/platform/plugins2-add-ons/

Each module (see Jira modules below) within the add-on also has a module key , which is unique within the add-on (eg. “myreport”). Semantically, this equates to the name of a Java class.

Following this naming convention seemed to solve this issue for me at least for now. But in the future I will try to inject some dummy data into new tables that I would create. Thanks for the info.

1 Like