• 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

Update Entity Beans Mapping in RSA

 
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hey friends

I'm using EJB 2.1 in Rational Software Architect 7 (RSA).

I've create a O/R mapping for some entity beans at Map.mapxmi file, but now the database changed
I've updated my database (added some columns and tables) and now I have to update the mapping according to the database update.
However, sadly, I can't find a way to do this in RSA, that is, make the RSA to update the mapping without having to recreate it.
How can I get the new tables'/columns' info to build the O/R mapping?

I appreciate any help.

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

I have the same issue.
I am using RAD, i have created the O/R mapping for some entity beans at Map.mapxmi, now i have to updated the xmil file to
include new mappings, bassically at the time of creating the entity beans, i need to include the two additional fields in ejbCreate() method
which are not nullable in database . So for that i need to updat the Map.mapxmi file.

Any help would be highly appreiciated.

With Regards,
-Nayan Parikh
 
Helder Alves
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi!

I've found a easy way to update the mapping.

First, you need to have a connection setted up in "Database Explorer" in RSA/RAD.
Before the nexte step you ned to connect to your database using RSA/RAD to get the database tables changes.
Then, right click the Ejb project and choose "Mapping from EJB to RDB">"Generate mapping".
Choose "Create new backend folder", "meet-in-the-middle", choose the connection previously configured. Type the username and password. Check the tables and "Finish".
Now, you will have 2 dbm files under "data diagrams" in EjbProject.
Select the new mapping and the old one, right click and choose "Compare".
Find the tables/columns you need to update and click "copy from Left to Right" or "copy from right to left".
Then you can delete the mapping you've just created, and the old mapping will be updated.

I hope it can help.

Ps: some texts may be a little different, I've translated literally from RSA in portuguese.
 
reply
    Bookmark Topic Watch Topic
  • New Topic