Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
S
SAE-Doctolib
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Paul Cancel
SAE-Doctolib
Commits
aa2c2d68
Commit
aa2c2d68
authored
10 months ago
by
Paul Cancel
Browse files
Options
Downloads
Patches
Plain Diff
Ajout persistence pour jpa
parent
1277c778
Branches
Branches containing commit
No related tags found
No related merge requests found
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
pom.xml
+12
-0
12 additions, 0 deletions
pom.xml
script.sql
+10
-3
10 additions, 3 deletions
script.sql
src/main/resources/META-INF/persistence.xml
+19
-0
19 additions, 0 deletions
src/main/resources/META-INF/persistence.xml
with
41 additions
and
3 deletions
pom.xml
+
12
−
0
View file @
aa2c2d68
...
...
@@ -35,6 +35,18 @@
<version>
6.1.0
</version>
<scope>
provided
</scope>
</dependency>
<!-- JPA -->
<dependency>
<groupId>
org.eclipse.persistence
</groupId>
<artifactId>
org.eclipse.persistence.jpa
</artifactId>
<version>
4.0.3
</version>
</dependency>
<!-- EclipseLink -->
<dependency>
<groupId>
org.eclipse.persistence
</groupId>
<artifactId>
eclipselink
</artifactId>
<version>
4.0.3
</version>
</dependency>
</dependencies>
<build>
...
...
This diff is collapsed.
Click to expand it.
script.sql
+
10
−
3
View file @
aa2c2d68
drop
table
if
exists
utilisateur
,
rendezvous
,
calendrier
,
requete
,
demande
;
drop
table
if
exists
utilisateur
,
rendezvous
,
calendrier
,
requete
,
rendezvous
;
create
table
utilisateur
(
email
text
primary
key
not
null
,
...
...
@@ -6,13 +6,20 @@ create table utilisateur(
prenom
text
,
telephone
decimal
(
10
,
0
),
date_naissance
date
,
mot_de_passe
text
mot_de_passe
text
,
isAdmin
boolean
);
create
table
calendrier
(
date_jour
date
primary
key
);
create
table
creneaux
(
heure
hour
,
minute
minute
,
occupe
boolean
default
false
);
create
table
requete
(
rno
serial
primary
key
,
motif
text
,
...
...
@@ -32,6 +39,6 @@ create table rendezvous(
insert
into
calendrier
values
(
TO_DATE
(
'20/09/2024'
,
'DD/MM/YYYY'
));
insert
into
utilisateur
values
(
'theo.vienne.etu@univ-lille.fr'
,
'Theo'
,
'Vienne'
,
0619515793
,
TO_DATE
(
'31/08/2000'
,
'DD/MM/YYYY'
),
'theovienne'
);
insert
into
utilisateur
values
(
'theo.vienne.etu@univ-lille.fr'
,
'Theo'
,
'Vienne'
,
0619515793
,
TO_DATE
(
'31/08/2000'
,
'DD/MM/YYYY'
),
'theovienne'
,
true
);
insert
into
requete
(
motif
,
description
)
values
(
'Rhume'
,
'Douleur au crane'
);
insert
into
rendezvous
values
(
'theo.vienne.etu@univ-lille.fr'
,
1
,
TO_DATE
(
'20/09/2024'
,
'DD/MM/YYYY'
));
\ No newline at end of file
This diff is collapsed.
Click to expand it.
src/main/resources/META-INF/persistence.xml
0 → 100644
+
19
−
0
View file @
aa2c2d68
<persistence
version=
"3.0"
xmlns=
"http://xmlns.jcp.org/xml/ns/persistence"
>
<persistence-unit
name=
"pu"
transaction-type=
"RESOURCE_LOCAL"
>
<class>
sae.doctolib.dto.User
</class>
<properties>
<property
name=
"jakarta.persistence.jdbc.url"
value=
"jdbc:postgresql://psqlserv/but3"
/>
<property
name=
"jakarta.persistence.jdbc.user"
value=
"paulcanceletu"
/>
<property
name=
"jakarta.persistence.jdbc.password"
value=
"moi"
/>
<property
name=
"jakarta.persistence.schema-generation.database.action"
value=
"drop-and-create"
/>
<property
name=
"jakarta.persistence.sql-load-script-source"
value=
"script.sql"
/>
<property
name=
"jakarta.persistence.schema-generation.scripts.action"
value=
"drop-and-create"
/>
<property
name=
"jakarta.persistence.schema-generation.scripts.create-target"
value=
"create.sql"
/>
<property
name=
"jakarta.persistence.schema-generation.scripts.drop-target"
value=
"destroy.sql"
/>
<property
name=
"eclipselink.logging.level"
value=
"FINE"
/>
</properties>
</persistence-unit>
</persistence>
\ No newline at end of file
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
sign in
to comment