Hey there,
I try to develop a plugin with some Entites.
I did this tutorial https://developer.atlassian.com/server/framework/atlassian-sdk/getting-started-with-active-objects/.
Everything compiles without error and runs fine.
Unfortunately the attributes of my entities are always NULL.
Entity
@Preload
public interface Product extends Entity{
public String getTitle();
public void setTitle(String title);
public String getProjectKey();
public void setProjectKey(String projectKey);
public String getIssueKey();
public void setIssueKey(String issueKey);
// @OneToMany
// public Persona[] getPersonas();
// @OneToMany
// public UserStory[] getUserStories();
}
adding Entity
private Product addProduct(String projectKey,String issueKey, String title){
final Product p = ao.create(Product.class);
p.setTitle(title);
p.setProjectKey(projectKey);
p.setIssueKey(issueKey);
return p;
}
Output:
List<Product> products = getAllProducts();
for (Product p : products) // (2)
{
System.out.println(p.getID());
System.out.println(p.getProjectKey());
System.out.println(p.getIssueKey());
}
I’ve tried also with @Table(“PRODUCT”).
What am I doing wrong?
Sven