• 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 ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Rob Spoor
  • Tim Cooke
  • Junilu Lacar
Sheriffs:
  • Henry Wong
  • Liutauras Vilda
  • Jeanne Boyarsky
Saloon Keepers:
  • Jesse Silverman
  • Tim Holloway
  • Stephan van Hulst
  • Tim Moores
  • Carey Brown
Bartenders:
  • Al Hobbs
  • Mikalai Zaikin
  • Piet Souris

Entity Bean with Multiple Tables

 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,

I am having trouble finding an example of an entity bean using multiple tables.

Could someone give an example of how to implement entity bean that pulls data from multiple tables.

As an example I have 2 tables:

Table name: tblUser
Fields: username, addressId

Table: tblAddress
Fields: addressId, address

I want my entity bean to contain 2 variables: "username", "address".
Bean:username, address
 
Ranch Hand
Posts: 63
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi

Entity beans have provided with cmr field so that u can get the data from the related tables using entity beans

Rgds
Kunal
 
Ranch Hand
Posts: 244
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hello Adam,

Which scenario are you looking for?

1. Single Entity bean mapping to 2 tables
JBuilder 9 provides Multiple Table mapping provided you have defined 2 Entity Beans each mapped to a single table as mentioned in pt 2.

2. Two Entity Beans each mapping to a single table (usually defined with CMR)

I am still looking for answers to the same query you have and how to insert/select records from 2 tables using a Single Entity Bean.

Keep me posted if you get something valuable.

Rgds,

Seetesh
 
You showed up just in time for the waffles! And this tiny ad:
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop
https://coderanch.com/wiki/718759/books/Building-World-Backyard-Paul-Wheaton
reply
    Bookmark Topic Watch Topic
  • New Topic