Path: csiph.com!usenet.blueworldhosting.com!feeder01.blueworldhosting.com!news.glorb.com!newsgate.cuhk.edu.hk!news.netfront.net!not-for-mail From: Davide 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: References: <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 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 ---