> > 1.1. Adding foreign key constraint must also create index
> > on foreign key field
> >
>
> I also may be mistaken, it's been a while since I've done a lot
> with PostgreSQL, but I don't remember the index being mandatory
> to create a foreign key constraint.
No, index isn't mandatory but it's recommended especially when the referenced table contains a lot of records or when referenced/referencing columns are changed frequently.
I agree that automated index creation should be implemented in user interface and of course must be optional. I'll try to play with listeners following your suggestions. However it would be nice to have a kind of logical connection between foreign key and corresponding index that was automatically created. In case of relationship removal a foreign key is removed and index should be removed as well. If we don't have such connection then we have to guess which index is to be removed. We may use name pattern for such guess so may be it's not a big problem.
> > 1.2. If a field is INTEGER and auto-increment = yes then
> > generate it as SERIAL
>
> If you work on this issue the hint I can give is to look at the commit
> http://code.google.com/p/power-architect/source/detail?r=2080 which,
> according to the bug, is the change that broke the SERIAL part. In particular
> the PostgresDDLGenerator class is the class you would be looking to fix.
> The change unfortunately fixes more than one issue, which we try to avoid
> to reduce confusion, and the change is meant to fix "generating two default
> values whenever the column is marked as serial".
I checked that and it seems to me that you are doing it wrong. I know how to make current version of Architect to generate two default values for column marked as serial but instead of fixing it I will try to suggest complete solution that will properly handle serial's in forward/backward engineering and data model comparing.
> > 1.3. Correctly handle 0-or-1 to many relationship
>
> This is a general shortcoming of our validation mechanism. [...]
> This validation became our critics in the code base and is contained
> in the packages ddl.critic and ddl.critic.impl.
> [...] You will find the critic message is given by the
> RelationshipMappingTypeCritic and could be solved by improving
> the logic around when to give the criticism.
I've found that already and corrected that particular validation.
> 1.6. There is also some inconsistency with comments/remarks between RE and CMD
CompareSQL, lines 255 and 258: sourceTable and targetTable should be replaced - this is a simple mistake. There's another issue concerning trailing spaces: it seems that RE trims spaces while CMD does not.
Could you please answer some questions:
1. How to add a completely new critic? I've created a new class and added it into STARTING_CRITICS in CriticManager but it's not enough.
2. How to mark that such critic class should be applied to particular database only, e.g. to PostgreSQL?
3. Could you briefly explain how Power Architect retrieve schema definition from database while
Tomasz Judycki
No, index isn't mandatory but it's recommended especially when the referenced table contains a lot of records or when referenced/referencing columns are changed frequently.
I agree that automated index creation should be implemented in user interface and of course must be optional. I'll try to play with listeners following your suggestions. However it would be nice to have a kind of logical connection between foreign key and corresponding index that was automatically created. In case of relationship removal a foreign key is removed and index should be removed as well. If we don't have such connection then we have to guess which index is to be removed. We may use name pattern for such guess so may be it's not a big problem.
1. How to add a completely new critic? I've created a new class and added it into STARTING_CRITICS in CriticManager but it's not enough.
2. How to mark that such critic class should be applied to particular database only, e.g. to PostgreSQL?
3. Could you briefly explain how Power Architect retrieve schema definition from database while forward engineering and model comparing?
3. Could you briefly explain how Power Architect retrieve schema definition from database while forward engineering and model comparing?
I'm not sure if I understand what you are asking. What information are you trying to get about the schema?
Regards, Tomasz Judycki Textus Virtualis Al. Wilanowska 313 02-665 Warszawa tel/fax (48 22) 879 82 00 http://www.tv.com.pl
--
You received this message because you are subscribed to the Google Groups "Architect Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to architect-developers+unsub...@googlegroups.com.
To post to this group, send email to architect-developers@googlegroups.com.
Visit this group at http://groups.google.com/group/architect-developers.
For more options, visit https://groups.google.com/groups/opt_out.
Regards, Tomasz Judycki Textus Virtualis Al. Wilanowska 313 02-665 Warszawa tel/fax (48 22) 879 82 00 http://www.tv.com.pl
To unsubscribe from this group and stop receiving emails from it, send an email to architect-develo...@googlegroups.com.
To post to this group, send email to architect-...@googlegroups.com.
Visit this group at http://groups.google.com/group/architect-developers.
For more options, visit https://groups.google.com/groups/opt_out.
--
Thomas O'Brien
www.sqlpower.ca
SQL Power Group Inc. | 4950 Yonge St. | Suite 1900 | Toronto,
Ontario M2N 6K1 | 416.221.4220 x224
--
You received this message because you are subscribed to the Google Groups "Architect Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to architect-develo...@googlegroups.com.
To post to this group, send email to architect-...@googlegroups.com.
Regards, Tomasz Judycki Textus Virtualis Al. Wilanowska 313 02-665 Warszawa tel/fax (48 22) 879 82 00 http://www.tv.com.pl
Regards, Tomasz Judycki Textus Virtualis Al. Wilanowska 313 02-665 Warszawa tel/fax (48 22) 879 82 00 http://www.tv.com.pl
For more options, visit https://groups.google.com/d/optout.
Regards, Tomasz Judycki Textus Virtualis Al. Wilanowska 313 02-665 Warszawa tel/fax (48 22) 879 82 00 http://www.tv.com.pl
For more options, visit https://groups.google.com/d/optout.
Regards, Tomasz Judycki Textus Virtualis Al. Wilanowska 313 02-665 Warszawa tel/fax (48 22) 879 82 00 http://www.tv.com.pl
Regards, Tomasz Judycki Atende Medica Sp. z o.o. Al. Wilanowska 313 02-665 Warszawa tel/fax (48 22) 879 82 00 http://www.atendemedica.plW dniu 2014-06-03 o 20:55, Thomas O'Brien pisze:
Regards, Tomasz Judycki Atende Medica Sp. z o.o. Al. Wilanowska 313 02-665 Warszawa tel/fax (48 22) 879 82 00 http://www.atendemedica.pl