[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
[
List Home]
RE: [eclipselink-users] When would an INSERT be called before an EM is commited?
|
Tim,
No problem. I bumped into that one myself last week working on an example that did a lot of object creation and querying. I still need to go back to the spec or the book and better understand the different modes and their use.
Doug
-----Original Message-----
From: Tim Hollosy [mailto:hollosyt@xxxxxxxxx]
Sent: Friday, May 02, 2008 9:45 AM
To: EclipseLink User Discussions
Subject: Re: [eclipselink-users] When would an INSERT be called before
an EM is commited?
I love this mailing list -- Thanks Doug, that did the trick. I wish I
would have sent the message about 2 hours earlier :)
On Fri, May 2, 2008 at 9:37 AM, <DOUGLAS.CLARKE@xxxxxxxxxx> wrote:
> Tim,
>
> Try forcing the flush-mode to commit:
>
> em.setFlushMode(FlushModeType.COMMIT);
>
> Doug
>
>
>
> -----Original Message-----
> From: Tim Hollosy [mailto:hollosyt@xxxxxxxxx]
> Sent: Friday, May 02, 2008 9:29 AM
> To: EclipseLink User Discussions
> Subject: [eclipselink-users] When would an INSERT be called before an EM
> is commited?
>
>
> I'm using a Persist cascade type to handle adding child tables in a
> ManyToOne relationship. Anyway, I am setting up my relationships, then
> the next time I hit the EM to do a simple select, EclipseLink is
> calling an INSERT on the ManyToOne table.
>
> This is a big problem since I have autocommit on and don't want to
> actually hit the database until the user specifically saves. I was
> under the impression that nothing would hit the database until i call
> commit on the entity manager.
>
> --
> ./tch
> _______________________________________________
> eclipselink-users mailing list
> eclipselink-users@xxxxxxxxxxx
> https://dev.eclipse.org/mailman/listinfo/eclipselink-users
> _______________________________________________
> eclipselink-users mailing list
> eclipselink-users@xxxxxxxxxxx
> https://dev.eclipse.org/mailman/listinfo/eclipselink-users
>
--
./tch
_______________________________________________
eclipselink-users mailing list
eclipselink-users@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/eclipselink-users