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
3 replies
Subscribers
9 subscribers
Views
1307 views
Users
0 members are here
Share
More
Cancel
Related Discussions
Home
»
Discussions
»
General
I have a legacy database that I'd like to build a CDT to access. It is compr
Richard
over 9 years ago
I have a legacy database that I'd like to build a CDT to access. It is comprised of many tables that have no foreign key relationship but was instead treated as a series of flat tables. For example:
Main table looks like this:
id int, primary key, description char(255), customerID int, representativeID int
Secondary table "Customer" customerID int, primary key, customer_name char(500)
Secondary table "Representative" representativeID int, primary key, representative_name (char 200)
Using an @OneToMany annotation appears to require a reference to the primary table embedded in the secondary tables. I don't find much documentation on @ManyToOne which sounds like it describes the relationship better.
Also, part of the application is to migrate this data to a newer database. That has all been created, so I really only need this for read access (and would obviously prefer to use a queryEntity).
Help?
OriginalPostID-193023
OriginalPostID-193023
Discussion posts and replies are publicly visible
Parents
0
Richard
over 9 years ago
Sorry, for the delay, our system administrator needed to do some work to support this and we're on-premise. So the answer is a resounding yes. Using @JoinColumn to connect a lookup table is a great solution. I am unfamiliar with JPA, and made the assumption that the @JoinColumn required a relationship summary annotation (e.g. @OneToMany).
That's not the case! Thank you!
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
Reply
0
Richard
over 9 years ago
Sorry, for the delay, our system administrator needed to do some work to support this and we're on-premise. So the answer is a resounding yes. Using @JoinColumn to connect a lookup table is a great solution. I am unfamiliar with JPA, and made the assumption that the @JoinColumn required a relationship summary annotation (e.g. @OneToMany).
That's not the case! Thank you!
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
Children
No Data