-
Notifications
You must be signed in to change notification settings - Fork 3.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Create FeedbackResponse and FeedbackResponseComment entities #12135
Create FeedbackResponse and FeedbackResponseComment entities #12135
Conversation
|
||
@Override | ||
public int hashCode() { | ||
// FeedbackResponseComment ID uniquely identifies a Feedback Response Comment. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
// FeedbackResponseComment ID uniquely identifies a Feedback Response Comment. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
removed
import jakarta.persistence.Entity; | ||
|
||
/** | ||
* Represents a text response. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
* Represents a text response. | |
* Represents a feedback numerical scale response. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
changed!
@OneToOne | ||
@JoinColumn(name = "giverSectionId") | ||
private Section giverSection; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is not a OneToOne relationship. Multiple responses can have the same giverSection.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
right, changed to ManyToOne
@OneToOne | ||
@JoinColumn(name = "receiverSectionId") | ||
private Section receiverSection; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same as above.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
changed!
/* | ||
* The old FeedbackResponse checks invalidity info for courseId and sessionName, | ||
* which do not exist on this new entity. | ||
*/ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
/* | |
* The old FeedbackResponse checks invalidity info for courseId and sessionName, | |
* which do not exist on this new entity. | |
*/ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
removed
|
||
@Override | ||
public int hashCode() { | ||
// FeedbackQuestion ID uniquely identifies a Feedback Response. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
// FeedbackQuestion ID uniquely identifies a Feedback Response. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
removed!
*/ | ||
@Entity | ||
@Table(name = "FeedbackReponseComments") | ||
public abstract class FeedbackResponseComment extends BaseEntity { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
public abstract class FeedbackResponseComment extends BaseEntity { | |
public class FeedbackResponseComment extends BaseEntity { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
changed
@OneToOne | ||
@JoinColumn(name = "giverSectionId") | ||
private Section giverSection; | ||
|
||
@OneToOne | ||
@JoinColumn(name = "receiverSectionId") | ||
private Section receiverSection; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As above, should not be OneToOne
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
changed to ManyToOne
Part of #12048
Outline of Solution
FeedbackResponse
andFeedbackResponseComment
entities.FeedbackResponse
,answer
is question specific, and thus placed into subtypes, similar to how it's done forFeedbackQuestion
.FeedbackParticipantTypeListConverter
fromFeedbackQuestion
intoBaseEntity
as its used byFeedbackResponseComment
.FeedbackQuestion
toFeedbackResponse