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;
...
@@ -13,7 +13,9 @@ import java.util.List;
public
interface
DaoUzyTavDetComca
extends
JpaRepository
<
ModelUzyTavDetComca
,
Long
>
{
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"
)
@Query
(
"SELECT p FROM ModelUzyTavDetComca p INNER JOIN p.uzytavcabcomca c WHERE c.uzytavcabcomca_id = :id"
)
List
<
ModelUzyTavDetComca
>
findByIdconDatosCabComca
(
@Param
(
"id"
)
Long
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
;
package
ec
.
edu
.
espe
.
movilidad
.
MovilidadWS
.
model
;
import
com.fasterxml.jackson.annotation.JsonIgnore
;
import
com.fasterxml.jackson.annotation.JsonIgnore
;
import
com.fasterxml.jackson.annotation.JsonView
;
import
lombok.Data
;
import
lombok.Data
;
import
javax.persistence.*
;
import
javax.persistence.*
;
...
@@ -17,32 +18,35 @@ public class ModelUzyTavCabComca {
...
@@ -17,32 +18,35 @@ public class ModelUzyTavCabComca {
@Column
(
name
=
"uzytavcabcomca_id"
)
@Column
(
name
=
"uzytavcabcomca_id"
)
private
Long
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
//RELACION CON PROYECT- cabcomca es la padre
//@OneToMany(cascade = CascadeType.ALL, fetch = FetchType.EAGER)
//@OneToMany(cascade = CascadeType.ALL, fetch = FetchType.EAGER)
//@JoinColumn(name = "uzytavcabcomca_id", referencedColumnName = "uzytavcabcomca_id")
//@JoinColumn(name = "uzytavcabcomca_id", referencedColumnName = "uzytavcabcomca_id")
//Set<ModelUzyTavProyec> modelUzyTavProyecss = new HashSet<>();
//Set<ModelUzyTavProyec> modelUzyTavProyecss = new HashSet<>();
@JsonIgnore
@OneToMany
(
mappedBy
=
"uzytavcabcomca"
,
cascade
=
CascadeType
.
ALL
)
@OneToMany
(
mappedBy
=
"uzytavcabcomca"
,
cascade
=
CascadeType
.
ALL
)
@JsonIgnore
private
Set
<
ModelUzyTavProyec
>
modelUzyTavProyecs
;
private
Set
<
ModelUzyTavProyec
>
modelUzyTavProyecs
;
//RELACION CON DETCOMCA-Tabla Hija
//RELACION CON DETCOMCA-Tabla Hija
@JsonIgnore
//
@OneToMany
(
mappedBy
=
"uzytavcabcomca"
,
cascade
=
CascadeType
.
ALL
)
@OneToMany
(
mappedBy
=
"uzytavcabcomca"
,
cascade
=
CascadeType
.
ALL
)
@JsonIgnore
private
Set
<
ModelUzyTavDetComca
>
modelUzyTavDetComcas
;
private
Set
<
ModelUzyTavDetComca
>
modelUzyTavDetComcas
;
@Column
(
name
=
"uzytavcabcomca_decsrip"
)
///fetch = FetchType.LAZY
private
String
uzytavcabcomca_decsrip
;
//RELACIÓN CON CONSOLCA- TABLA PADRE
@ManyToOne
@Column
(
name
=
"uzytavcabcomca_fech_crea"
)
@JsonIgnore
private
Date
uzytavcabcomca_fech_crea
;
///fetch = FetchType.LAZY
@JsonIgnore
()
@ManyToOne
()
@JoinColumn
(
name
=
"uzytavconsolca_id"
)
@JoinColumn
(
name
=
"uzytavconsolca_id"
)
private
ModelUzyTavConsolca
uzytavconsolca
;
private
ModelUzyTavConsolca
uzytavconsolca
;
}
}
src/main/java/ec/edu/espe/movilidad/MovilidadWS/model/ModelUzyTavDetComca.java
View file @
d285db09
...
@@ -16,7 +16,7 @@ public class ModelUzyTavDetComca {
...
@@ -16,7 +16,7 @@ public class ModelUzyTavDetComca {
private
Long
uzytavdetcomca_id
;
private
Long
uzytavdetcomca_id
;
//Relacion con la tabla CabComca-Tabla padre
//Relacion con la tabla CabComca-Tabla padre
@JsonIgnore
()
//
@JsonIgnore()
@ManyToOne
@ManyToOne
@JoinColumn
(
name
=
"uzytavcabcomca_id"
)
@JoinColumn
(
name
=
"uzytavcabcomca_id"
)
private
ModelUzyTavCabComca
uzytavcabcomca
;
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