isis-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Dan Haywood <...@haywood-associates.co.uk>
Subject Re: Domain create table issue
Date Wed, 05 Feb 2014 14:22:53 GMT
On 5 February 2014 13:47, Chohan, Dharmesh <dharmesh.chohan@atos.net> wrote:

> Hi Dan
>
> I could not see the CREATE TABLE for the domain in the logging.
>

OK.

Although DataNucleus will lazily create tables on first use, we've found a
few issues with that if subtypes of classes are only discovered lazily.  So
we find it a good idea to force the creation of all entities.

The website explains how to do this [1].  Do you have this configuration?



>
> The application works fine, the error was produced when installing the
> fixture from wicket viewer Prototyping->Install fixtures.  The error was
> caused by calling the isisJdoSupport.executeUpdate("delete from
>  \"TopUpAmount\"")
>
>

> I have removed the line isisJdoSupport.executeUpdate("delete from
>  \"TopUpAmount\"") and now it does not throw the error.  It seems the table
> is created on first use of the domain.
>
> OK... understood... the table didn't exist because it was lazily created,
but the fixture you were running eagerly expected it to be there.

In which case the RegisterEntities should sort things out.

Cheers
Dan




> Regards
> Dharmesh
>
>

[1]
https://isis.apache.org/components/objectstores/jdo/eagerly-registering-entities.html



> -----Original Message-----
> From: Dan Haywood [mailto:dan@haywood-associates.co.uk]
> Sent: Wednesday, February 05, 2014 12:33 PM
> To: users
> Subject: Re: Domain create table issue
>
> On 5 February 2014 11:14, Chohan, Dharmesh <dharmesh.chohan@atos.net>
> wrote:
>
> > Hi
> >
> > I have added a new domain as below and when I check the output it does
> > not create the table for that domain.  The problem comes when
> > installing the fixture and running the command
> > isisJdoSupport.executeUpdate("delete from
> > \"TopUpAmount\"")
> >
>
> I don't quite follow this.
>
> Do you see the 'CREATE TABLE' statement in the logging?  If so, then we
> know that the JDO/DN annotations are correct.
>
>
> To confirm, if you comment out the fixture setup, does Isis boot up ok?
>
> If it does, then check the output; I'm guessing that there might be an
> issue with the table name; that could be dependent on the JDBC driver you
> are dependent on.  Postgres requires the double quotes to be escaped,
> others support [square brackets] etc.
>
>
>
> >
> > [snip]
> > @ObjectType("TopUp Amount")
> > @Bookmarkable
> > public class TopUpAmount implements Comparable<TopUpAmount> { .... }
> >
> >
> >
> ~~~
> Also, not sure if it's your issue, but there shouldn't be a space in the
> @ObjectType value.  That gets used internally to create the OID of the
> object, and could be causing a problem later on
>
> Let us know
>
> Dan
>
>
>
>
> > For all other domains ISIS creates a table for them.
> >
> >
> > Any ideas.
> >
> > Thanks
> > Dharmesh
> >
> >
> >
> >
> >
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message