-2
Guys, I’m in my first persistence class, but the code is not working,
**mysql persistence file:*
<?xml version="1.0" encoding="UTF-8"?>
<persistence version="2.0"xmlns="http://java.sun.com/xml/ns/persistence" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/persistence http://java.sun.com/xml/ns/persistence/persistence_2_0.xsd">`
<persistence-unit name="exemploPU" transaction-type="RESOURCE_LOCAL">
<properties>
<property name="javax.persistence.jdbc.url" value="jdbc:mysql://localhost:3306/cadastro_cliente"/>
<property name="javax.persistence.jdbc.user" value="root"/>
<property name="javax.persistence.jdbc.password" value="root"/>
<property name="javax.persistence.jdbc.driver" value="com.mysql.jdbc.Driver"/>
<!-- validate | update | create | create-drop -->
<property name="hibernate.hbm2ddl.auto" value="update"/>
<property name="hibernate.dialect" value="org.hibernate.dialect.MySQLDialect"/>
</properties>
</persistence-unit>
</persistence>
@ngueno vlw by the help in formatting, I was not able to adjust, but as needed help in the code I posted that way. in the next I improve the formatting of it.
– henrique.marques
Don’t worry, it takes getting used to :) one thing you should always do is replace tabs with spaces, tabs mess up all the formatting
– nullptr
I get it, this is why the formatting was misaligned ? the use of TAB ? because I could not put all code inside the block.
– henrique.marques
yes, it breaks all tags, another thing is to paste the whole text normally, select the part of code and then mark it as code using the editor button
– nullptr
Blza, thank you very much!!!
– henrique.marques
You’re welcome, you’re welcome :)
– nullptr
@Henrique.marques Here are some formatting tips: https://answall.com/editing-help#code
– hkotsubo
@hkotsubo, vlw.... I think this is the link I saw, thank you very much for your attention.
– henrique.marques