How to format the COMMENT content

Hi,

I am new to the Data Modeler. We are using the COMMENT clause in MySQL for tables and columns to help generate a Data Dictionary. Once we create the database, we run the reverse engineer and the the Report -> HTML to get the dictionary.

My problem is - how can get the content of that field/attribute formatted? I tried adding \n for link breaks and also

but neither worked.

Any suggestions???

It looks as though TDM is escaping the < and > characters - which is NOT what I want. It I want the html formatting as I entered it.

I guess my work-around could be to generate the report and then change all < to < and change all > to > but that seems like a hassle.

Message was edited by: mike.miller@jda.com

Hi Mike,

I created a sample model for MySQL 5 and added a two lines long comment to one of the entities (one carriage return).

Generated code:
CREATE TABLE entity1
(
Attribute1 Char(20)
) ENGINE = InnoDB
ROW_FORMAT = Compact
COMMENT = ‘this is just
a sample’;

Then created the database physically and tried to reverse engineer it. The comment was loaded properly. Then I generated HTML report and the comment was OK again.

What software did you use for physical creation of the database? E.g. MySQL Query Browser allows you to enable or disable options like “Create Windows style line breaks (LF CR)”, Enable friendly line breaks, Substitude CR, Substitude LF etc. Please try to play a little with these options, if you use this software.

BTW: I used HeidiSQL (http://www.heidisql.com/).

Re: character escaping: I believe it’s OK to escape the <> characters. Imagine that you write XML code in your comments. Such comments will not be displayed in the report. Also, what if you wish to see HTML CODE, including all tags etc?

Regards,

Vaclav
two-lines-comment.png

Hi Mike,

I created a sample model for MySQL 5 and added a two lines long comment to one of the entities (one carriage return).

Generated code:
CREATE TABLE entity1
(
Attribute1 Char(20)
) ENGINE = InnoDB
ROW_FORMAT = Compact
COMMENT = 'this is just
a sample';

Then created the database physically and tried to reverse engineer it. The comment was loaded properly. Then I generated HTML report and the comment was OK again.

What software did you use for physical creation of the database? E.g. MySQL Query Browser allows you to enable or disable options like "Create Windows style line breaks (LF CR)", Enable friendly line breaks, Substitude CR, Substitude LF etc. Please try to play a little with these options, if you use this software.

BTW: I used HeidiSQL (http://www.heidisql.com/).

Re: character escaping: I believe it's OK to escape the <> characters. Imagine that you write XML code in your comments. Such comments will not be displayed in the report. Also, what if you wish to see HTML CODE, including all tags etc?

Regards,

Vaclav