Changing the annotation of ProjectIdea#match from @ManyToOne to @OneToOne.
This commit is contained in:
parent
b049f978a4
commit
e7ccb4be73
resources/db_update_scripts
src/main/java/se/su/dsv/scipro/match/dataobject
@ -1,9 +1,7 @@
|
||||
-- required database changes
|
||||
-- required database changes for the property Match#rejectedBy
|
||||
ALTER TABLE matchings ADD COLUMN rejectedBy_id bigint(20);
|
||||
ALTER TABLE matchings ADD CONSTRAINT `FK24A2D416D0C9D7F5` FOREIGN KEY (`rejectedBy_id`) REFERENCES `user` (`id`);
|
||||
|
||||
|
||||
|
||||
/* The results running the queries above should look exactly like the hibernate generated table below, this can be tested by
|
||||
running "show create table matchings;" from the command prompt
|
||||
|
||||
@ -31,4 +29,7 @@ CREATE TABLE IF NOT EXISTS `matchings` (
|
||||
CONSTRAINT `FK24A2D4169AA5FCB` FOREIGN KEY (`createdBy_id`) REFERENCES `user` (`id`),
|
||||
CONSTRAINT `FK24A2D416BCA56165` FOREIGN KEY (`supervisor_id`) REFERENCES `role` (`id`)
|
||||
) ENGINE=InnoDB AUTO_INCREMENT=25 DEFAULT CHARSET=latin1 |
|
||||
*/
|
||||
*/
|
||||
|
||||
-- no database changes were required for changing the annotation of ProjectIdea#match from @ManyToOne to @OneToOne
|
||||
|
||||
|
@ -79,7 +79,7 @@ public class ProjectIdea extends DomainObject {
|
||||
@OrderBy("dateCreated DESC, id DESC")
|
||||
private List<Match> matchHistory = new ArrayList<Match>();
|
||||
|
||||
@ManyToOne
|
||||
@OneToOne(optional = true)
|
||||
private Match match;
|
||||
|
||||
@Override
|
||||
|
Loading…
x
Reference in New Issue
Block a user