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
5 replies
Subscribers
7 subscribers
Views
1969 views
Users
0 members are here
Share
More
Cancel
Related Discussions
Home
»
Discussions
»
General
Hi, I am getting an annotation error for one of CDTs wherein its primary ke
vspravin
over 7 years ago
Hi,
I am getting an annotation error for one of CDTs wherein its primary key is using the annotation : @SequenceGenerator.
The error message looks like "A type mapping annotation is invalid: Could not instantiate id generator [entity-name=PRTPlanDT14727] (MappingException) (APNX-2-4055-000) "
So just wanted to confirm whether @SequenceGenerator annotation is supported by MySQL server as i read in one of the earlier forum notes that this annotation is supported only by Oracle and IBM DB2 server. Please confirm.
OriginalPostID-222478
OriginalPostID-222478
Discussion posts and replies are publicly visible
0
Ramesh Gudipati
over 7 years ago
@pavins: Are you talking about auto generation of primary Key. If so this is supported in MySql.
<xsd:annotation>
<xsd:appinfo source="appian.jpa">@Column(name="ID") @Id @GeneratedValue</xsd:appinfo>
</xsd:annotation>
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
vspravin
over 7 years ago
@rameshg : Yes it is regarding autogeneration of primary key, which i am aware it is supported in MySQL, but my query was whether the annotation @SequenceGenerator which is used for generating primary keys whether this is supported by MySQL as i read in one of the earlier forum comments that it is supported only by Oracle and IBM DBS RDBMS.
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
Ramesh Gudipati
over 7 years ago
It is possible even in MySQL. We used in our previous project.
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
Ramesh Gudipati
over 7 years ago
But you need to configure this in the schema of the data base.
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
Andrew P Gramann
Certified Lead Developer
over 7 years ago
MySQL does not use sequences for auto-generated primary keys. Instead, you just tell MySQL to set the column as AUTO_INCREMENT. If you let Appian publish the tables, all you need is the annotations that rameshg73 mentioned in his first post.
More about auto-incremented columns in this stackoverflow article:
stackoverflow.com/.../how-do-i-create-a-sequence-in-mysql
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel