Win a copy of Node.js Design Patterns: Design and implement production-grade Node.js applications using proven patterns and techniques this week in the Server-Side JavaScript and NodeJS forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
  • Campbell Ritchie
  • Ron McLeod
  • Rob Spoor
  • Tim Cooke
  • Junilu Lacar
  • Henry Wong
  • Liutauras Vilda
  • Jeanne Boyarsky
Saloon Keepers:
  • Jesse Silverman
  • Tim Holloway
  • Stephan van Hulst
  • Tim Moores
  • Carey Brown
  • Al Hobbs
  • Mikalai Zaikin
  • Piet Souris

AST6: Mapping EJB / RDB With Views in Oracle9

Posts: 2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi to everyone,
using AST6.1.1.8, I'm trying to map some Entity Beans to objects in a Data Source based on Oracle 9i.

Each Bean contains a string key field.
The Data Source is composed by Tables and Views as well. Each Table has a Primary Key field, and each View has it too.
In particular, the PKs of the Views are built using commands like:

(someone told me that this is the ONLY way to associate a PK to a View in Oracle9i)

Importing the Data Source in AST6 I can see that:
- Table PKs are imported correctly: I can see PK Constraints in the DDL file and <OracleModel:OracleIndex> nodes in the XML contained in the DBM file
- View PKs are NOT imported: I can't see neither Constraints in DDL nor proper nodes in DBM

So, while I can correctly associate some Entity Beans of mine to Tables, when mapping some other Entity Beans to Views, I can associate all fields except the key ones, for AST6 doesn't allow to associate a key field (in the Bean) with a non-key field (in the View, as key fields are seen as normal ones due to mis-importing)
I could remove key fields from Beans, associate non-key bean fields with non-key view fields and then re-add the keys to the bean, but AST6 is so smart and raises errors.

Does everyone knows
1 - how can I correctly import Views PKs into the AST6 Data Model or how can I add them manually (editing the DBM XML)
2 - how can I associate key bean fields to non-key view fields (even manually)
3 - how can I build Entity Beans WITHOUT Key? the <prim-key-class> is mandatory in ejb-jar.xml
4 - anything else that can help me to move on from this mess in which I'm very stuck

Many many many thanks in advance

Marco Brugnoli
Posts: 2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I tried to use MATERIALIZED VIEWS but AST6 doesn't ever see them

Anyone has hints for me?

    Bookmark Topic Watch Topic
  • New Topic