isis-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stephen Cameron <steve.cameron...@gmail.com>
Subject Re: Using database Views
Date Wed, 14 Feb 2018 21:17:11 GMT
Hi,

Using a DataNucleus capability rather than an Apache Isis one.

http://www.datanucleus.org/products/accessplatform_3_1/rdbms/views.html

You can use annotations in your class instead of a jdo config file, I
copied examples from Estatio to get started.

But here is one I've created:
https://github.com/Stephen-Cameron-Data-Services/isis-chats/blob/master/reports/src/main/java/au/com/scds/chats/dom/report/view/ActivityAttendanceSummary.java

The class can be seen by making your view class a ViewModel.

I don't think you can use persistable views, may be wrong on that.

I've had a problem with views, that DN tries to create them before the
underlying tables are created, never resolved that but I should.

If I were to start afresh I'd not use them unless absolutely necessary for
performance, instead use queries on my domain objects and write code, then
you have easier refactoring.

Steve



On Thu, Feb 15, 2018 at 2:26 AM, Smitha N <smithasharaf@gmail.com> wrote:

> Hi,
>
> In our application, there is a need to use database views and I was
> wondering what is the best way to implement it using the framework.
>
> How do we map the database view fields to the Object? Can we use ViewModels
> with persistanceCapability and refer to the view?
>
> If above scenario is valid, how do we make such scenarios work for
> integration testing?
> If not please advise on how to use database views.
>
> Regards
> Smitha
>

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