INSERT DELAYED with JPA

106 views
Skip to first unread message

computerpunc

unread,
Apr 27, 2011, 11:19:12 AM4/27/11
to play-framework
I have tables in MySQL DB that are mostly used for statistical
purposes by an external program. The web application inserts data to
these tables and once in a while the external program perform some
short analysis.
Prior to Play, I used to insert the data to the tables using INSERT
DELAYED to the DB. How can I do that in Play with JPA?

Thanks for the help,
computerpunc.

Guillaume Bort

unread,
Apr 27, 2011, 12:08:13 PM4/27/11
to play-fr...@googlegroups.com
You can't, JPA ignore your database specific features. But you can use
plain old JDBC if your want.

> --
> You received this message because you are subscribed to the Google Groups "play-framework" group.
> To post to this group, send email to play-fr...@googlegroups.com.
> To unsubscribe from this group, send email to play-framewor...@googlegroups.com.
> For more options, visit this group at http://groups.google.com/group/play-framework?hl=en.
>
>

--
Guillaume Bort, http://guillaume.bort.fr

dallastx

unread,
Apr 27, 2011, 2:37:02 PM4/27/11
to play-framework

computerpunc

unread,
Apr 28, 2011, 2:02:58 PM4/28/11
to play-framework
Unfortunately, this doesn't work because INSERT DELAYED doesn't return
an auto-generated object id and thus hibernate throws an exception.

On Apr 27, 9:37 pm, dallastx <eric.m.l...@gmail.com> wrote:
> http://stackoverflow.com/questions/1587756/insert-low-priority-or-ins...
>
> On Apr 27, 11:08 am, Guillaume Bort <guillaume.b...@gmail.com> wrote:
>
>
>
>
>
>
>
> > You can't, JPA ignore your database specific features. But you can use
> > plain old JDBC if your want.
>
> > On Wed, Apr 27, 2011 at 5:19 PM, computerpunc <computerp...@gmail.com> wrote:
> > > I have tables in MySQL DB that are mostly used for statistical
> > > purposes by an external program. The web application inserts data to
> > > these tables and once in a while the external program perform some
> > > short analysis.
> > > Prior to Play, I used toinsertthe data to the tables usingINSERT
> > >DELAYEDto the DB. How can I do that in Play with JPA?
Reply all
Reply to author
Forward
0 new messages