Menu

#23 manage indices and foreign keys by constraint name

open
None
5
2008-05-07
2007-10-15
No

I post here a feature request as a summary for two independent contributions in the forum.

RE: template packs
By: nfdavenport (nfdavenport) - 2007-10-11 20:13
http://sourceforge.net/forum/message.php?msg_id=4564260

RE: Multiple field foreign keys
By: David Goodenough (dfgdga) - 2007-10-12 08:09
http://sourceforge.net/forum/message.php?msg_id=4565762

As a matter of fact, the foreign keys (aka imported keys) are not considered as being named. The indices are ignored in version 2.6.x and in experimental status in the 3.0 version.

As for the imported keys, that piece of information can be retrieved from DatabaseMetaData.getImportedKeys as the FK_NAME of the returned result set.

As for the indices, that piece of information can be retrieved from DatabaseMetaData.getIndexInfo as the INDEX_NAME of the returned result set.

It may be worth considering the generation of a bunch of methods like getBy${indexName}() or getBy${foreignKeyName}() in order to keep in pace with the schema definition philosophy.

Discussion

  • Gerits Daan

    Gerits Daan - 2007-10-15

    Logged In: YES
    user_id=913855
    Originator: NO

    Hello Alain,

    Let me first start with the most easy part, the template packs. They will be available in the upcoming release. NKript is creating a new website which include a package repository, so other users will have the ability to share their template packs.

    The indices and the whole key issue will take some more time. Jordan has been looking into it and is busy creating that part of the application.

    I know this isn't much information, but it has to do for now. I will post more information on the progress of those issues asap.

    Daan

     
  • Alain Fagot Béarez

    • assigned_to: nobody --> kameleono
     
  • Alain Fagot Béarez

    Logged In: YES
    user_id=4796
    Originator: YES

    There is now a partial implementation for that feature managing only the indices.

    The manager.java.vm template has been adapted to generate two new methods:
    - loadBy${indexName}(indexColumns)
    - deleteBy${indexName}(indexColumns)

     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.