Thought inc.

The Dynamic O/R Mapping Company
     

CocoBase Technical Support Forums
For access to developer site with software download and doc's, please request CocoBase download and password
will be emailed to you. Response to posts will appear when answered by THOUGHT Support team.
NOTE:You must register separately with forum in order to post your questions, please click on register icon below.
Home   Frequently Asked Questions   Search   Edit your profile   Registration is free!  
Email This Page to Someone!
Show a Printable Version
CocoBase Enterprise O/R Forums > CocoBase Bug Reports
Recreate BMP if we change database structure. How to handle?
< Previous Thread     Next Thread >
Author
Thread    Post New Thread     Post A Reply
sumit
Member

Registered: Apr 2001
Posts: 62

Hi,

We created table structure in the database, we created maps
using CocoBase admin tool and generated BMPs using admin tool
and got the source code in Visual Age for Java through
integration. Then we added some business methods in the BMP.
After sometime, we decided to add an attribute. So we altered
the database table and created the map again. But now if I
have to create my BMP again and overwrite the existing one
then I?ll lose all my business methods. Please suggest a
solution for this problem. This kind of scenarios will occur
at our end multiple times, so please treat this issue as a
very high priority one.

04-26-2001 12:17 AM
Click Here to See the Profile for sumit    Find more posts by sumit        Edit/Delete Message    Reply w/Quote    IP: Logged
admin
Administrator

Registered: Apr 2001
Posts: 19

You don't have to regenerate, but you can if you'd like
and merge the two versions. Visual Age may have some
merge facility that you like, but often our customers use
a windows based merge facility from www.araxis.com called
Araxis Merge. It's a really nice graphical tool that lets
you do side by side comparison and merge, and it's very
fast to do the task you're describing...

Now if you don't want to regenerate, just add the public
get/set methods on the bean, and stateObject and the
method signature on the remote interface for any new
attributes in the same way that you would for your own
code. The only caveat to this is that you'll notice in
the methods we already have created in your EntityBean,
that we also have a modified flag in the set attribute.
You should also copy this line of code from one of the
other generated method.

That's all you need to ensure you have your existing
code preserved while you add new persistent attributes...

THOUGHT Support

04-26-2001 12:32 PM
Click Here to See the Profile for admin    Find more posts by admin        Edit/Delete Message    Reply w/Quote    IP: Logged
sumit
Member

Registered: Apr 2001
Posts: 62

Hi,

Thanks for the response. But i'll really appreciate if
you guys can give me an example on this, clearly highlighting
the changes and the place where we have to make these.

04-27-2001 10:55 PM
Click Here to See the Profile for sumit    Find more posts by sumit        Edit/Delete Message    Reply w/Quote    IP: Logged
admin
Administrator

Registered: Apr 2001
Posts: 19

We're not sure what we could/should provide. As we said
before this depends on how you're working as to what you
should do, but here are some general guidelines.

If you want to use CocoBase and regenerate, then you can
use source code control, and then you can easily merge any
changes between the two version with a merge tool such as
the Araxis merge tool.

Otherwise if you just want to add an attribute, you can
just add your own get/set methods by copying the get and
set methods of another attribute as you would with any
java class...

Are these instructions confusing in some way?

THOUGHT Support

04-30-2001 03:16 PM
Click Here to See the Profile for admin    Find more posts by admin        Edit/Delete Message    Reply w/Quote    IP: Logged
All times are PST (US)    Post New Thread     Post A Reply
Forum Jump:
< Previous Thread     Next Thread >

Forum Rules:
Who Can Read The Forum? Any registered user or guest.
Who Can Post New Topics? Any registered user.
Who Can Post Replies? Any registered user.
Changes: Messages can be edited by their author. Messages can be deleted by their author.
Posts: HTML code is OFF. Smilies are OFF. vB code is OFF. [IMG] code is OFF.

Admin Options:
Open / Close Thread
Move Thread
Delete Thread
Edit Thread

< Contact Us - THOUGHT Inc. >

Copyright © Jelsoft Enterprises Limited 2000.
Copyright 2001 All Rights Reserved, THOUGHT Inc.