Since I posted that mail, I looked through the source code of
DBDictionary, and as a result of that I the SQLiteDictionary to have
lastGeneratedKeyQuery = "SELECT MAX({0}) FROM {1}";
My mapping is simply any class with an @Id column. I have succeeded in
making this work by adding @GeneratedValue(strategy =
GenerationType.IDENTITY), but would like to be able to make this work
with the JPA auto strategy as well.
Thanks
-Marc
On 10/28/07, Patrick Linskey <plinskey@gmail.com> wrote:
> Hi,
>
> What does your mapping look like for your class?
>
> -Patrick
>
> On 10/26/07, Marc Siegel <marc.siegel.17@gmail.com> wrote:
> > Hi folks,
> >
> > I am trying to user OpenJPA 1.0.0 on top of SQLiteJDBC.
> > OpenJPA wants to insert an Id if zero for every row.
> >
> > I know I need a DBDictionary subclass, I have tried making one with
> > - createPrimaryKey = false
> > - lastGeneratedKeyQuery = "SELECT SEQ FROM SQLITE_SEQUENCE WHERE
> > NAME = \"{0}\"";
> >
> > Neither of these worked. Any knowledgable suggestions?
> >
> > Many thanks,
> > -Marc
> >
>
>
> --
> Patrick Linskey
> 202 669 5907
>
|