<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>Forem: Douglas Marques Ramos Rodrigues Amaral</title>
    <description>The latest articles on Forem by Douglas Marques Ramos Rodrigues Amaral (@amaraldmrra).</description>
    <link>https://forem.com/amaraldmrra</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F2242761%2Fc6703d0a-0b21-42da-9daf-f8696c353c5e.png</url>
      <title>Forem: Douglas Marques Ramos Rodrigues Amaral</title>
      <link>https://forem.com/amaraldmrra</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://forem.com/feed/amaraldmrra"/>
    <language>en</language>
    <item>
      <title>Java doubts</title>
      <dc:creator>Douglas Marques Ramos Rodrigues Amaral</dc:creator>
      <pubDate>Mon, 21 Oct 2024 13:09:48 +0000</pubDate>
      <link>https://forem.com/amaraldmrra/as-duvidas-de-java-2np8</link>
      <guid>https://forem.com/amaraldmrra/as-duvidas-de-java-2np8</guid>
      <description>&lt;h2&gt;
  
  
  Using a Java Record
&lt;/h2&gt;

&lt;p&gt;While studying for a project that is starting, I came across the situation of using the Record or a class using JPA.&lt;/p&gt;

&lt;h3&gt;
  
  
  Behaviors
&lt;/h3&gt;

&lt;p&gt;I just realized that the Record does not behave in the same way as a class using Lombok, because it creates the attributes as Final. Today I am trying to mature the scenario in using it.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;1-&lt;/strong&gt; It is not allowing me to insert the value of the encrypted password because it starts the object and it cannot be changed. When I start the object with the password already encrypted, I have a problem because it does not have the ID. &lt;/p&gt;

&lt;p&gt;&lt;strong&gt;2-&lt;/strong&gt; I tried to choose to encrypt the password when creating the user, but when JPA executes the save method, I still have an ID problem because it does not provide the ID. Since it was supposed to be incremented automatically.&lt;/p&gt;

&lt;h3&gt;
  
  
  Previous projects
&lt;/h3&gt;

&lt;p&gt;All the projects I participated in, they always had an ORM structure, with JPA|Hibernate.&lt;br&gt;
I always tried to maintain the structure because I understood that it was easy to read and well structured. But I have always worked with the normal class and building with the lombook features and configurations for creating the database.&lt;/p&gt;

&lt;h3&gt;
  
  
  Current studies
&lt;/h3&gt;

&lt;p&gt;Now I am trying to adjust the knowledge of the Record structure, to understand, if the problem is my understanding or the Record that will always behave this way.&lt;/p&gt;

</description>
      <category>java</category>
      <category>beginners</category>
      <category>productivity</category>
    </item>
  </channel>
</rss>
