Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
B
BackEnd-V2
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
JIRA
JIRA
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Joel Andres Molina Velez
BackEnd-V2
Commits
d285db09
Commit
d285db09
authored
Jun 04, 2023
by
Joel Andres Molina Velez
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
.
parent
c5f1d7c0
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
18 additions
and
12 deletions
+18
-12
DaoUzyTavDetComca.java
...edu/espe/movilidad/MovilidadWS/dao/DaoUzyTavDetComca.java
+3
-1
ModelUzyTavCabComca.java
...espe/movilidad/MovilidadWS/model/ModelUzyTavCabComca.java
+14
-10
ModelUzyTavDetComca.java
...espe/movilidad/MovilidadWS/model/ModelUzyTavDetComca.java
+1
-1
No files found.
src/main/java/ec/edu/espe/movilidad/MovilidadWS/dao/DaoUzyTavDetComca.java
View file @
d285db09
...
...
@@ -13,7 +13,9 @@ import java.util.List;
public
interface
DaoUzyTavDetComca
extends
JpaRepository
<
ModelUzyTavDetComca
,
Long
>
{
//Obtener los datos relacionados con la tabla CabComca mediante un id
, además que tengan tipo 1= Parametros de evaluacion inicial
//Obtener los datos relacionados con la tabla CabComca mediante un id
@Query
(
"SELECT p FROM ModelUzyTavDetComca p INNER JOIN p.uzytavcabcomca c WHERE c.uzytavcabcomca_id = :id"
)
List
<
ModelUzyTavDetComca
>
findByIdconDatosCabComca
(
@Param
(
"id"
)
Long
id
);
}
src/main/java/ec/edu/espe/movilidad/MovilidadWS/model/ModelUzyTavCabComca.java
View file @
d285db09
package
ec
.
edu
.
espe
.
movilidad
.
MovilidadWS
.
model
;
import
com.fasterxml.jackson.annotation.JsonIgnore
;
import
com.fasterxml.jackson.annotation.JsonView
;
import
lombok.Data
;
import
javax.persistence.*
;
...
...
@@ -17,32 +18,35 @@ public class ModelUzyTavCabComca {
@Column
(
name
=
"uzytavcabcomca_id"
)
private
Long
uzytavcabcomca_id
;
@Column
(
name
=
"uzytavcabcomca_decsrip"
)
private
String
uzytavcabcomca_decsrip
;
@Column
(
name
=
"uzytavcabcomca_fech_crea"
)
private
Date
uzytavcabcomca_fech_crea
;
//RELACION CON PROYECT- cabcomca es la padre
//@OneToMany(cascade = CascadeType.ALL, fetch = FetchType.EAGER)
//@JoinColumn(name = "uzytavcabcomca_id", referencedColumnName = "uzytavcabcomca_id")
//Set<ModelUzyTavProyec> modelUzyTavProyecss = new HashSet<>();
@JsonIgnore
@OneToMany
(
mappedBy
=
"uzytavcabcomca"
,
cascade
=
CascadeType
.
ALL
)
@JsonIgnore
private
Set
<
ModelUzyTavProyec
>
modelUzyTavProyecs
;
//RELACION CON DETCOMCA-Tabla Hija
@JsonIgnore
//
@OneToMany
(
mappedBy
=
"uzytavcabcomca"
,
cascade
=
CascadeType
.
ALL
)
@JsonIgnore
private
Set
<
ModelUzyTavDetComca
>
modelUzyTavDetComcas
;
@Column
(
name
=
"uzytavcabcomca_decsrip"
)
private
String
uzytavcabcomca_decsrip
;
@Column
(
name
=
"uzytavcabcomca_fech_crea"
)
private
Date
uzytavcabcomca_fech_crea
;
///fetch = FetchType.LAZY
@JsonIgnore
()
@ManyToOne
()
///fetch = FetchType.LAZY
//RELACIÓN CON CONSOLCA- TABLA PADRE
@ManyToOne
@JsonIgnore
@JoinColumn
(
name
=
"uzytavconsolca_id"
)
private
ModelUzyTavConsolca
uzytavconsolca
;
}
src/main/java/ec/edu/espe/movilidad/MovilidadWS/model/ModelUzyTavDetComca.java
View file @
d285db09
...
...
@@ -16,7 +16,7 @@ public class ModelUzyTavDetComca {
private
Long
uzytavdetcomca_id
;
//Relacion con la tabla CabComca-Tabla padre
@JsonIgnore
()
//
@JsonIgnore()
@ManyToOne
@JoinColumn
(
name
=
"uzytavcabcomca_id"
)
private
ModelUzyTavCabComca
uzytavcabcomca
;
...
...
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