Hi Chris,

given you've used DN for a while, just wondering if you comment on the
vagaries (or otherwise) of using HSQLDB or H2 in conjunction with
@PersistenceCapable(catalog=...) or @PersistenceCapable(schema=...) ?  Not
tried either approach myself (always just used table=...), but wondered if
you have?

Thx
Dan


On 5 January 2015 at 23:45, Chris Colman <[email protected]>
wrote:

> While I haven't used Isis in earnest yet I have done many years of
> Datanucleus.
>
> For unit tests I use an embeddable DBs like H2 and use them in file mode
> rather than in pure memory mode because then for a failed test you can
> do a post mortem using the data stored in the database, accessing it via
> the H2 console.
>
> Each unit test gets its own unique DB (file) whose file is autonamed
> based on the concatenation of the test class name + test method name.
> Make sure you do the delete of the DB file in setup and not tear down
> otherwise you wont have any DB on which to perform post mortems.
>
> Using DN directly we simply form the DB Url string at runtime in setup
> and then set the relevant property before handing the properties object
> onto DN to create the PMF - which may not be possible via annotations.
>
> >-----Original Message-----
> >From: Dan Haywood [mailto:[email protected]]
> >Sent: Tuesday, 6 January 2015 2:48 AM
> >To: users
> >Subject: Re: multiple databases for integration tests
> >
> >Haven't tried to do this, Erik.
> >
> >That said, isn't that annotation wrong ?... I don't think it's valid to
> >have a "." in the table name.
> >
> >Instead, have you tried using @PersistenceCapable(schema="DB1",
> >table="tableA") or perhaps @PersistenceCapable(catalog="DB1",
> >table="tableA").
> >
> >Dan
> >
> >
> >
> >On 5 January 2015 at 13:58, Erik de Hair <[email protected]> wrote:
> >
> >> Hi,
> >>
> >> Anybody an idea how to set up integration tests in Isis with multiple
> >> in-memory databases?
> >>
> >> My domain model uses 2 databases by specifying the table name like
> >> @PersistenceCapable(table="DB1.tableA") and
> >@PersistenceCapable(table="DB2.tableB").
> >> DB1 is the databases configured in the testsystem initializer. DB2
> isn't
> >> automatically created during initiation of the integration tests.
> >>
> >> Thanks,
> >> Erik
> >>
>

Reply via email to