Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
2
20230403
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Patryk Czarnik
20230403
Commits
9dfc63be
Commit
9dfc63be
authored
May 26, 2023
by
Patryk Czarnik
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Orders i Customers - rozwiązanie problemu cyklicznej zależności
parent
ce4312e4
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
0 deletions
+6
-0
Customer.java
PC36-RestSpring/src/main/java/sklep/model/Customer.java
+3
-0
OrderProduct.java
PC36-RestSpring/src/main/java/sklep/model/OrderProduct.java
+3
-0
No files found.
PC36-RestSpring/src/main/java/sklep/model/Customer.java
View file @
9dfc63be
...
...
@@ -7,6 +7,8 @@ import jakarta.validation.constraints.Pattern;
import
java.util.List
;
import
com.fasterxml.jackson.annotation.JsonIgnore
;
/**
* The persistent class for the customers database table.
...
...
@@ -39,6 +41,7 @@ public class Customer extends WspolnaNadklasa implements Serializable {
//bi-directional many-to-one association to Order
@OneToMany
(
mappedBy
=
"customer"
)
@JsonIgnore
private
List
<
Order
>
orders
;
public
Customer
()
{
...
...
PC36-RestSpring/src/main/java/sklep/model/OrderProduct.java
View file @
9dfc63be
...
...
@@ -7,6 +7,8 @@ import jakarta.validation.constraints.Min;
import
java.math.BigDecimal
;
import
com.fasterxml.jackson.annotation.JsonIgnore
;
/**
* The persistent class for the order_products database table.
...
...
@@ -34,6 +36,7 @@ public class OrderProduct extends WspolnaNadklasa implements Serializable {
//bi-directional many-to-one association to Order
@ManyToOne
@JoinColumn
(
name
=
"order_id"
,
insertable
=
false
,
updatable
=
false
)
@JsonIgnore
private
Order
order
;
//uni-directional many-to-one association to Product
...
...
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