Qin Ding
2003-07-22 14:23:34 UTC
I am new to the middlegen. After downloaded the middlegen, I followed the
demo and get-start document. It looks great. I decided to learn more. I
used firebird as my business database. First I try the Employee.gdb, which
is the example database come along with the firebird download. Here is my
questions, problems and comments:
1. When loading many tables ( in hundreds in an enterprise information
system) into middlegen GUI, how do I hide and unhide the tables, so they
are not so crowded? Like in Microsoft Access DB Relationship view.
2. If there are no relationships shown between two tables as in GUI, is
there a way I can draw a line to build the relationships like in Microsoft
Access DB Relationship view.?
3. In firebird, when a data type is SmallInt, it is mapped to
java.lang.Short. What is the mapping file used and where is it located if
I use JBoss as my App Server?
4. In firebird, a trigger is used to populate the primary key (type of
smallint). How do I tell middlegen not to populate the bean id field,
because when the bean get saved to the database, I guess the key is
automatically generated by the trigger.
5. Because the pk field is smallint -> Short, I received the error
Short(int) can't be resolved. Middlegen sequenceGenerator generates an id
of type int, which is a param passed to the Short constructor. I have to
use the middlegen GUI to change all key field (pk and fk) from smallint to
int, the error goes away. However, I am worried that in database the type
remains as smallint, in java object it is int. What happens when the id
get very big for the smallint to hold?
6. Is there an easy way to make changes from one type to another in GUI or
in ant task? If I have over hundred tables and much more fields from
existing enterprise database, I feel we can configure the middlegen to take
int type whenever it finds a smallint.
7. In db, I have a country table, which is referenced by several tables.
When I compile the java source, I get an error stating that getCountry is
already defined. Same in department table which is referenced by many
tables. The error states that getDepartment() is already defined. Because
I do not write any business code in this exarcise, every thing is generated
by middlegen by reading in database meta info, it makes wonder I perhaps
have to adjust the relationships somehow. I don't know what and how,
though. What's the problem here? And where I should look in order to avoid
this problem?
8. Where can I find the document (a complete user guide) on all the
relationship attribute like (many2many). What else do we have (one2one,
one2many)?
9. I heard that in middlegen next version includes a hibernate plug-in?
How soon the next version will be released?
It is a great tool. Keep up the good work.
Qin
----------------------------------------------------------------------------------------
This is a PRIVATE message. If you are not the intended recipient, please
delete without copying and kindly advise us by e-mail of the mistake in
delivery. NOTE: Regardless of content, this e-mail shall not operate to
bind CSC to any order or other contract unless pursuant to explicit written
agreement or government initiative expressly permitting the use of e-mail
for such purpose.
----------------------------------------------------------------------------------------
demo and get-start document. It looks great. I decided to learn more. I
used firebird as my business database. First I try the Employee.gdb, which
is the example database come along with the firebird download. Here is my
questions, problems and comments:
1. When loading many tables ( in hundreds in an enterprise information
system) into middlegen GUI, how do I hide and unhide the tables, so they
are not so crowded? Like in Microsoft Access DB Relationship view.
2. If there are no relationships shown between two tables as in GUI, is
there a way I can draw a line to build the relationships like in Microsoft
Access DB Relationship view.?
3. In firebird, when a data type is SmallInt, it is mapped to
java.lang.Short. What is the mapping file used and where is it located if
I use JBoss as my App Server?
4. In firebird, a trigger is used to populate the primary key (type of
smallint). How do I tell middlegen not to populate the bean id field,
because when the bean get saved to the database, I guess the key is
automatically generated by the trigger.
5. Because the pk field is smallint -> Short, I received the error
Short(int) can't be resolved. Middlegen sequenceGenerator generates an id
of type int, which is a param passed to the Short constructor. I have to
use the middlegen GUI to change all key field (pk and fk) from smallint to
int, the error goes away. However, I am worried that in database the type
remains as smallint, in java object it is int. What happens when the id
get very big for the smallint to hold?
6. Is there an easy way to make changes from one type to another in GUI or
in ant task? If I have over hundred tables and much more fields from
existing enterprise database, I feel we can configure the middlegen to take
int type whenever it finds a smallint.
7. In db, I have a country table, which is referenced by several tables.
When I compile the java source, I get an error stating that getCountry is
already defined. Same in department table which is referenced by many
tables. The error states that getDepartment() is already defined. Because
I do not write any business code in this exarcise, every thing is generated
by middlegen by reading in database meta info, it makes wonder I perhaps
have to adjust the relationships somehow. I don't know what and how,
though. What's the problem here? And where I should look in order to avoid
this problem?
8. Where can I find the document (a complete user guide) on all the
relationship attribute like (many2many). What else do we have (one2one,
one2many)?
9. I heard that in middlegen next version includes a hibernate plug-in?
How soon the next version will be released?
It is a great tool. Keep up the good work.
Qin
----------------------------------------------------------------------------------------
This is a PRIVATE message. If you are not the intended recipient, please
delete without copying and kindly advise us by e-mail of the mistake in
delivery. NOTE: Regardless of content, this e-mail shall not operate to
bind CSC to any order or other contract unless pursuant to explicit written
agreement or government initiative expressly permitting the use of e-mail
for such purpose.
----------------------------------------------------------------------------------------