• 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
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

One BMP for several postgresql tables

 
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi all,
I want to solve a problem with a BMP which represent many tables in a Postgres database. Each tables have 3 columns : id, name and image.
My problem is when I want to get the lines from a table, the ejbLoad() method is not done by the bean when the id have ever been known before for an other table :
example :
Table1
id=1 ; name=toto ; image=toto.jpg
id=2 ; name=tata ; image=tata.jpg
id=3 ; name=titi ; image=titi.jpg

Table2
id=2 ; name=tutu ; image=tutu.jpg

When I get all lines from Table1, it works fine but when I ask for Table2, it returns : id=2 ; name=tata ; image=tata.jpg instead of id=2 ; name=tutu ; image=tutu.jpg.

Is somebody knows how to force the ejbLoad() to look in the database or knows another solution to solve this problem ???

Thanks a lot for response.
Nicolas
 
Ranch Hand
Posts: 143
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
It seems in your ejobLoad method you are calling Table1 in both cases. Please check to make sure your query calls Table2.

Sudhir
 
Nicolas Taillepied
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Sudhir, I'm sure not to call Table1 in both cases because if I call first Table2 the response is : id=2 ; name=tutu ; image=tutu.jpg
And after if I call Table1 :
id=1 ; name=toto ; image=toto.jpg
id=2 ; name=tutu ; image=tutu.jpg
id=3 ; name=titi ; image=titi.jpg
I've check the problem, it comes from that ejbLoad() is not made when the id was asked before.
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic