Some problems I can't find a solution for

Hello,

First of all I want to say this product is very nice, but I have a few problems with it.

The first question I would like to ask, is how to add new datatypes to a class?
For example:

I have timestamps in my database, now I have mapped these tables to classes in an ORM diagram.
When I generate the Java code, it creates the datatype Timestamp for the java classes.
That is fine, except Java needs to implement java.sql.Timestamp which the generator does not do.

Is there any way to tell the generator to add a new import to a class to a specific datatype ?

Second, when I add a new datatype it doesn’t seem to do anything (through the configure programming languages in tools).
I add for example, data type Timestamp, but all it does then is create a new entry Data type => Timestamp, with name => Timestamp.
There is no way to map Timestamp for example to Integer because it automatically changes back to Timestamp when you click ok.

Then the third question, is there a date datatype available for Java?
I found one in the Visual Basic menu, but not in other programming languages.
I wanted to map the timestamp to a Date object in Java but that also requires an import in the java class.

Last I have a suggestion, is it perhaps possible for a future release (or update) to have the ability to add packages to seperate classes instead of entire diagrams.
You can see the packages of individual classes (and their children) but there is no way to change this except changing the entire diagram (or do i not know of it?).
I know a short solution for this would be to create different diagrams with some class overviews, but it would be nicer to do this individually.

I hope someone could answer these questions,
thank you for your time.

Hello radic,

Thanks for your post and sorry for not having replied until now.

I have forwarded the first 3 issues to our engineers for further studies. But I am sorry to say that I do not quite understand your suggestion about adding package to class. Would you mind providing me with more information?

I look forward to hearing from you.

Best regards,
Jick

Hello radic,

Are you using ORM code generation? If not, you need to specify full type name.

Add datatype is to make the added type available in type combo box. It also let you reference to an exact type model rather than to a string, which let you rename the type to affect all the instances.

Then the third question, is there a date datatype available for Java?

If you are using ORM code generation, you should not need to import the type manually. The generated code should have that ready. Could you provide me with more information know more about this point?

About the final suggestion, you can add package(shape) to the diagram to contain the classes.

Best regards,
Jick

[quote=Jick]Hello radic,
[/quote]

Hello Jick,

So if i understand, it is used to make the datatype universal (and thus reducing typing errors), instead of typing it each time ?

No, i was using instant generator, i will try ORM generation later today (got some errors to fix I am seeing :)) and post my findings.

I see that this is possible, but you have to drag the package around all the classes.
When you check the specification of a class, it would be easier to be able to set the package (you can view it now, but there is no way to change the package name here).

As far as i know these are the ways to add packages to classes:

  1. Enter the package name in the topleft corner of a diagram (affects all classes in diagram)
  2. Create a package shape from the common panel, and drag it over classes (this supports individual but it is really messy).

Now what i wanted to suggest is that you can also, as a 3rd option, change the package in the specification of a class (like adding a parameter for example).
(see attachment)

Thank you for your answers.


packageexample.JPG

Hello radic,

So if i understand, it is used to make the datatype universal (and thus reducing typing errors), instead of typing it each time ?

This is one of the advantage. Apart from this, you can imagine if all types are pointing to the same model, when you update the name of that model, all the consumers gain benefit from this.

About the restructuring of class, I have a suggestion for you - You can try move the classes between packages under the Model tree through drag and drop. I guess this is more convenient to you, am I right? Besides, you can select and right-click from the Model a set of classes, then select Move… to move them to another package.

Best regards,
Jick

move-models.png

[quote=Jick]Hello radic,

So if i understand, it is used to make the datatype universal (and thus reducing typing errors), instead of typing it each time ?

This is one of the advantage. Apart from this, you can imagine if all types are pointing to the same model, when you update the name of that model, all the consumers gain benefit from this.

About the restructuring of class, I have a suggestion for you - You can try move the classes between packages under the Model tree through drag and drop. I guess this is more convenient to you, am I right? Besides, you can select and right-click from the Model a set of classes, then select Move… to move them to another package.

Best regards,
Jick[/quote]

Hello Jick,

Thank you for your answers.
I am using the model tree now for the packages and it works great, ORM generates alot of errors though (for some reasons he sometimes does not see the ERD => ORM connection while it is there, i figured out this was because I used some ORM diagrams in class diagrams, and now it thinks it belongs to the other package).
But I can work them out and post my findings about the datatypes.

Hello radic,

Although I do not know exactly what the errors are, I think that you can, if possible, send us your project, and point to us where the problems are. This will help identifying the problem.

Best regards,
Jick