Appian Community
Site
Search
Sign In/Register
Site
Search
User
DISCUSS
LEARN
SUCCESS
SUPPORT
Documentation
AppMarket
More
Cancel
I'm looking for ...
State
Not Answered
Replies
4 replies
Subscribers
6 subscribers
Views
2020 views
Users
0 members are here
Share
More
Cancel
Related Discussions
Home
»
Discussions
»
Process
I am having difficulty using the @SecondaryTable annotation. My goal
lindat
over 11 years ago
I am having difficulty using the @SecondaryTable annotation.
My goal was to change from saying:
pv!software.softwareCategory.name
to:
pv!software.softwareCategoryName
The error I’m currently getting when I try to verify my data store is: “The data source schema does not match the type mappings: Missing table: sss_sw_category”
I modified an existing CDT (that verified just fine) from:
<xsd:complexType name="SSS_Software">
<xsd:annotation>
<xsd:appinfo source="appian.jpa">
@Table(name="SSS_SOFTWARE")
</xsd:appinfo>
</xsd:annotation>
...
<xsd:element name="softwareCategory" type="sss:SSS_SoftwareCategory">
<xsd:annotation>
<xsd:appinfo source="appian.jpa">
@ManyToOne(cascade=CascadeType.REFRESH)
@JoinColumn(name="CATEGORY_ID")
</xsd:appinfo>...
OriginalPostID-79812
OriginalPostID-79812
Discussion posts and replies are publicly visible
Parents
0
lindat
over 11 years ago
...
</xsd:annotation>
</xsd:element>
...
</xsd:complexType>
to:
<xsd:complexType name="SSS_Software">
<xsd:annotation>
<xsd:appinfo source="appian.jpa">
@Table(name="SSS_SOFTWARE")
@SecondaryTable(name="SSS_SW_CATEGORY", pkJoinColumns=@PrimaryKeyJoinColumn(name="CATEGORY_ID", referencedColumnName="ID"))
</xsd:appinfo>
</xsd:annotation>
...
<xsd:element name="softwareCategoryName" type="xsd:string">
<xsd:annotation>
<xsd:appinfo source="appian.jpa">
@Column(table="SSS_SW_CATEGORY", name="NAME", nullable=false, insertable=false, updatable=false)
</xsd:appinfo>
</xsd:annotation>
</xsd:element>
...
</xsd:complexType>
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
Reply
0
lindat
over 11 years ago
...
</xsd:annotation>
</xsd:element>
...
</xsd:complexType>
to:
<xsd:complexType name="SSS_Software">
<xsd:annotation>
<xsd:appinfo source="appian.jpa">
@Table(name="SSS_SOFTWARE")
@SecondaryTable(name="SSS_SW_CATEGORY", pkJoinColumns=@PrimaryKeyJoinColumn(name="CATEGORY_ID", referencedColumnName="ID"))
</xsd:appinfo>
</xsd:annotation>
...
<xsd:element name="softwareCategoryName" type="xsd:string">
<xsd:annotation>
<xsd:appinfo source="appian.jpa">
@Column(table="SSS_SW_CATEGORY", name="NAME", nullable=false, insertable=false, updatable=false)
</xsd:appinfo>
</xsd:annotation>
</xsd:element>
...
</xsd:complexType>
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
Children
No Data