Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
G
GoikLectures
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Deploy
Releases
Container registry
Model registry
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Goik Martin
GoikLectures
Commits
b3965b11
Commit
b3965b11
authored
9 years ago
by
Goik Martin
Browse files
Options
Downloads
Patches
Plain Diff
cleaning pom.xml from comments, hibernate specific --> JPA
parent
31636674
Branches
Branches containing commit
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
Doc/Sda2/jpa.xml
+17
-14
17 additions, 14 deletions
Doc/Sda2/jpa.xml
ws/eclipse/HibIntro/pom.xml
+0
-40
0 additions, 40 deletions
ws/eclipse/HibIntro/pom.xml
with
17 additions
and
54 deletions
Doc/Sda2/jpa.xml
+
17
−
14
View file @
b3965b11
...
...
@@ -249,22 +249,22 @@
<title>
Adding Hibernate dependencies
</title>
<para>
Our goal is to start using Hibernate for a console based project.
Searching the Maven repository for hibernate-
core provides a suitable
artifact:
</para>
Searching the Maven repository for
<code>
hibernate-
entitymanager
</code>
provides a suitable
artifact:
</para>
<programlisting
language=
"none"
>
<
dependency
>
<
groupId
>
org.hibernate
<
/groupId
>
<
artifactId
>
hibernate-
core
<
/artifactId
>
<
version
>
4
.1.
9
.Final
<
/version
>
<
/dependency
>
</programlisting>
<
groupId
>
org.hibernate
<
/groupId
>
<
artifactId
>
hibernate-
entitymanager
<
/artifactId
>
<
version
>
5
.1.
0
.Final
<
/version
>
<
/dependency
>
</programlisting>
</section>
<section
xml:id=
"sect_createHibernateConfiguration"
>
<title>
Creating a
Hibernate
configuration
</title>
<title>
Creating a
<xref
linkend=
"glo_JPA"
/>
configuration
</title>
<para>
Hibernate
is intended to provide persistence
services saving
transient
<xref
linkend=
"glo_Java"
/>
instances to a
database. For this
purpose Hibernate needs
:
</para>
<para>
<xref
linkend=
"glo_JPA"
/>
is intended to provide persistence
services saving
transient
<xref
linkend=
"glo_Java"
/>
instances to a
database. For this purpose we have to provide
:
</para>
<itemizedlist>
<listitem>
...
...
@@ -308,10 +308,13 @@
</listitem>
</itemizedlist>
<para>
Hibernate offers an XML based configuration syntax. We show a toy
example of a
<filename>
hibernate.cfg.xml
</filename>
configuration file
mapping just one class
<classname>
hibintro.v1.model.User
</classname>
to
a
<xref
linkend=
"glo_Soft_Mysql"
/>
database server:
</para>
<para><xref
linkend=
"glo_JPA"
/>
offers an XML based configuration syntax
typically residing in
<filename>
src/main/resources/META-INF/persistence.xml
</filename>
. We
show a toy example of a
<filename>
hibernate.cfg.xml
</filename>
configuration file mapping just one class
<classname>
hibintro.v1.model.User
</classname>
to a
<xref
linkend=
"glo_Soft_Mysql"
/>
database server:
</para>
<figure
xml:id=
"hibernateConfigurationFile"
>
<title>
A basic Hibernate configuration file
...
...
This diff is collapsed.
Click to expand it.
ws/eclipse/HibIntro/pom.xml
+
0
−
40
View file @
b3965b11
...
...
@@ -16,7 +16,6 @@
<dependencies>
<dependency>
<groupId>
org.hibernate
</groupId>
<artifactId>
hibernate-entitymanager
</artifactId>
...
...
@@ -29,45 +28,6 @@
<version>
5.1.38
</version>
</dependency>
<!-- <dependency> -->
<!-- <groupId>junit</groupId> -->
<!-- <artifactId>junit</artifactId> -->
<!-- <version>4.12</version> -->
<!-- </dependency> -->
<!-- <dependency> -->
<!-- <groupId>mysql</groupId> -->
<!-- <artifactId>mysql-connector-java</artifactId> -->
<!-- <version>5.1.22</version> -->
<!-- <scope>runtime</scope> -->
<!-- </dependency> -->
<!-- <dependency> -->
<!-- <groupId>org.hibernate</groupId> -->
<!-- <artifactId>hibernate-core</artifactId> -->
<!-- <version>4.1.9.Final</version> -->
<!-- </dependency> -->
<!-- <dependency> -->
<!-- <groupId>org.jdom</groupId> -->
<!-- <artifactId>jdom</artifactId> -->
<!-- <version>2.0.2</version> -->
<!-- </dependency> -->
<!-- <dependency> -->
<!-- <groupId>org.testng</groupId> -->
<!-- <artifactId>testng</artifactId> -->
<!-- <version>6.8</version> -->
<!-- </dependency> -->
<!-- <dependency> -->
<!-- <groupId>org.slf4j</groupId> -->
<!-- <artifactId>slf4j-api</artifactId> -->
<!-- <version>1.7.5</version> -->
<!-- </dependency> -->
<!-- <dependency> -->
<!-- <groupId>org.slf4j</groupId> -->
<!-- <artifactId>slf4j-log4j12</artifactId> -->
<!-- <version>1.7.5</version> -->
<!-- </dependency> -->
</dependencies>
<build>
<plugins>
...
...
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
register
or
sign in
to comment