Hi all,
I have a problem with active objects. Here are the different classes defined. Could you tell me what's wrong? I am using oracle database, a.o 0.24 and confluence 5.3.1.
Document:
public interface Document extends BaseModel { @NotNull public String getTitle(); public void setTitle(String title); @ManyToMany(reverse = "getDocument", through = "getKeyword", value = DocumentToKeyword.class) public Keyword[] getKeywords(); public void setKeywords(Keyword[] keywords); @ManyToMany(reverse = "getDocument", through = "getCategory", value = DocumentToCategory.class) public Category[] getCategories(); public void setCategories(Category[] categories); public String getDescription(); public void setDescription(String description); @NotNull public InputStream getDocument(); public void setDocument(InputStream document); public InputStream getDocumentPreview(); public void setDocumentPreview(InputStream documentPreview); @NotNull public int getPublicationYear(); public void setPublicationYear(int publicationYear); @NotNull public String getAuthor(); public void setAuthor(String author); public String getType(); public void setType(String type); }
Category:
public interface Category extends BaseModel { @NotNull public String getName(); public void setName(String name); @ManyToMany(reverse = "getCategory", through = "getDocument", value = DocumentToCategory.class) public Document[] getDocuments(); public void setDocuments(Document[] documents); }
Keyword
public interface Keyword extends BaseModel { @NotNull public String getName(); public void setName(String name); @ManyToMany(reverse = "getKeyword", through = "getDocument", value = DocumentToKeyword.class) public Document[] getDocuments(); public void setDocuments(Document[] documents); }
And the two mapping classes:
public interface DocumentToCategory extends Entity { public Document getDocument(); public void setDocument(Document document); public Category getCategory(); public void setCategory(Category category); }
public interface DocumentToKeyword extends Entity { public Document getDocument(); public void setDocument(Document document); public Keyword getKeyword(); public void setKeyword(Keyword keyword); }
If I remove those two fields (Category/Keyword) from my Document entity everything works fine.
Here are my entities defined:
<ao key="ao-module"> <description>The module configuring the Active Objects service used by this plugin </description> <entity>confluence.plugin.model.Category</entity> <entity>confluence.plugin.model.Document</entity> <entity>confluence.plugin.model.Rating</entity> <entity>confluence.plugin.model.Keyword</entity> <entity>confluence.plugin.model.DocumentToKeyword</entity> <entity>confluence.plugin.model.DocumentToCategory</entity> </ao>
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.