Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > it.comp.java > #8891

Re: JPA detached entity

Path csiph.com!usenet.blueworldhosting.com!feeder01.blueworldhosting.com!news.glorb.com!newsgate.cuhk.edu.hk!news.netfront.net!not-for-mail
From Davide <a@a.com>
Newsgroups it.comp.java
Subject Re: JPA detached entity
Date Sat, 26 Mar 2016 16:02:51 +0100
Organization Netfront http://www.netfront.net/
Lines 20
Message-ID <nd688e$h2n$1@adenine.netfront.net> (permalink)
References <nd1i1r$25te$1@adenine.netfront.net> <0d59bcc5-4860-4218-b339-7f2f17cea807@googlegroups.com>
NNTP-Posting-Host 79.17.189.137
Mime-Version 1.0
Content-Type text/plain; charset=windows-1252
Content-Transfer-Encoding 8bit
X-Trace adenine.netfront.net 1459004495 17495 79.17.189.137 (26 Mar 2016 15:01:35 GMT)
X-Complaints-To news@netfront.net
NNTP-Posting-Date Sat, 26 Mar 2016 15:01:35 +0000 (UTC)
User-Agent Mozilla/5.0 (Windows NT 6.3; WOW64; rv:38.0) Gecko/20100101 Thunderbird/38.7.0
In-Reply-To <0d59bcc5-4860-4218-b339-7f2f17cea807@googlegroups.com>
Xref csiph.com it.comp.java:8891

Show key headers only | View raw


Il 26/03/2016 15:11, Cicap ha scritto:
> Il giorno giovedì 24 marzo 2016 20:18:05 UTC, Davide ha scritto:
>> Salve,
>> sto sviluppando un'applicazione java ee che usa jpa, se nel DAO faccio
>> una cancellazione (metodo remove()) di un'entità detached viene
>> giustamente generata un'eccezione che indica che l'entità è detached
>> mentre invece se faccio un'aggiornamento (metodo merge()) di un'entità
>> detached non viene generata nessuna eccezione e l'aggiornamento va a
>> buon fine, come mai succede questo?
> 
> Domanda: cosa pensi che faccia l'operazione "merge" in generale? E da quale fonte ti sei formato quell'idea.
> 

Scusami, per errore ho risposto sulla tua mail.

L'operazione merge credo che faccia un update, la fonte è:
https://docs.oracle.com/javaee/6/api/javax/persistence/EntityManager.html#merge%28T%29


--- news://freenews.netfront.net/ - complaints: news@netfront.net ---

Back to it.comp.java | Previous | NextPrevious in thread | Next in thread | Find similar


Thread

JPA detached entity Davide <a@a.com> - 2016-03-24 21:18 +0100
  Re: JPA detached entity Cicap <forzatonino@gmail.com> - 2016-03-26 07:11 -0700
    Re: JPA detached entity Davide <a@a.com> - 2016-03-26 16:02 +0100
      Re: JPA detached entity Cicap <forzatonino@gmail.com> - 2016-03-26 11:55 -0700
        Re: JPA detached entity Davide <a@a.com> - 2016-03-26 20:15 +0100

csiph-web