Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - cnj_mike

Pages: [1]
1
General Board / Re: transformation Class diagram -> DDL
« on: June 19, 2006, 11:18:40 am »
I'm using PK/FKs of type INT and I have the same problem.  I have two members of class Component as FK to class Item.  My intention is

CLASS Component
 FK container_id  (containerId=itemId)
 FK component_id (componentId=itemId)

but no joy.  Any way to transform the PIM to a DDL without having to write my own transform code?  Seems like a common need.

2
hi!  sorry i can't seem to find this in the documentation...

i've written a custom code generator and i want to be able to set the file extension used when i generate the package.  is there any way to do that that doesn't involve setting the filenames one class at a time?

thx
m

3
OK, here's another question. =)

I'd like to auto generate some stored procs for classes.  I have an operation like Get_By_Folder_Owner(folder_id: INTGER) defined in the class model, and I want to be able to write the transform that generates a stored proc for service prototyping that looks like

create procedure sp_Folder_Get_By_Folder_Owner(
  @folder_id INTEGER
) as

select %list=attributes...

blah blah blah

I can figure out how to use the code generation rules to do this... except... i'm also generating action script code from the PIM for the actual classes.  If I define my own target language to create the procs, then I get hosed up moving back and forth between generating AS and my SP_DDL.

I can't find any way to modify the DDL generation process, tho that would be ideal.

Any suggestions on how to tackle this?

Thx

4
OK... I was grumpy last night. =)  It's actually very easy to update the transforms to do what I want.

These changes I'm making to transformation rules are in the project file, right, not common across all projects?  I'd have to export and import them?

Thanks
M

5
Folks - a somewhat related problem.

I've defined a class model using ActionScript as a base.  I want object IDs in the class model, so I defined attrs of type Number named <class>_id, with a PK stereotype. I also have a number of associations between classes.

When I transform to a DDL, the associations are treated as FKs, which I want, but the FK generation doesn't seem to recognize that I've already defined a PK in the class and creates a new one.  It also seems to not translate the type of the class attr with a PK stereotype.

I would just delete my class PKs and let them be generated, but then if I generate ActionScript from the model it's missing the PKs cuz they only appear in the DDL.

Can anyone offer help?  Am I going to have to hack all the code in this app to make it do what it's advertised to do?

Thx

Pages: [1]