Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Khalid Ali
bookshare-backend
Commits
d6f3221f
Commit
d6f3221f
authored
Dec 20, 2018
by
Khalid Ali
Browse files
Listing OneToMany relationship to Bid
parent
05254971
Changes
2
Hide whitespace changes
Inline
Side-by-side
src/main/java/com/gmu/bookshare/entity/Bid.java
View file @
d6f3221f
...
...
@@ -30,7 +30,4 @@ public class Bid {
@Column
(
name
=
"userId"
)
private
Long
userId
;
@Column
(
name
=
"listingId"
)
private
Long
listingId
;
}
src/main/java/com/gmu/bookshare/entity/ListingEntity.java
View file @
d6f3221f
...
...
@@ -4,6 +4,7 @@ import lombok.*;
import
javax.persistence.*
;
import
java.util.Date
;
import
java.util.List
;
@Data
@NoArgsConstructor
...
...
@@ -48,9 +49,12 @@ public class ListingEntity {
@Column
(
name
=
"createDate"
)
private
Date
createDate
;
@NonNull
@Column
(
name
=
"bid_id"
)
private
Long
bid_id
;
@Column
(
name
=
"bidList"
)
@OneToMany
@JoinTable
(
name
=
"Listing2Bids"
,
joinColumns
=
{
@JoinColumn
(
name
=
"Listing_FK"
)},
inverseJoinColumns
=
{
@JoinColumn
(
name
=
"Bids_FK"
)})
private
List
<
Bid
>
bidList
;
@NonNull
@Column
(
name
=
"owner"
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment