logo       


Bug : foreign keys corrected: msg#00013

Subject: Bug : foreign keys corrected



Hello,


I have the same problem described in the email below, but I get an error with xdoclet. The changes in the Xdoclet tags i file cmp-entity20.vm (middlegen-entitybean-plugin-2.0-vo.jar) are false. Could you please tell me why are these changes uncorrect :


Before changes :


* @ejb.value-object
    *   aggregate="${plugin.interfacePackage}.${target.baseClassName}LightValue"
    *   aggregate-name="${target.baseClassName}"
    *   members="$target.localClassName"
    *   members-name="${target.baseClassName}"
    *   match="all"
    *   relation="external"
    *   type="java.util.Collection"
#else
    * @ejb.value-object
    *   aggregate="${plugin.interfacePackage}.${target.baseClassName}LightValue"
    *   aggregate-name="${target.baseClassName}"
    *   match="all"
    *   relation="external"


After changes:


@ejb.value-object

    *   aggregate="${plugin.interfacePackage}.${target.baseClassName}LightValue"

    *   aggregate-name="${table.getVariableName(${relationshipRole})}"                
    *   members="$target.localClassName"

    *   members-name="${table.getVariableName(${relationshipRole})}"                  
    *   match="all"

    *   relation="external"

    *   type="java.util.Collection"

#else

    * @ejb.value-object

    *   aggregate="${plugin.interfacePackage}.${target.baseClassName}LightValue"

    *   aggregate-name="${table.getVariableName(${relationshipRole})}"                
    *   match="all"

    *   relation="external"



Cordially,



*************************************************************
Lionel Protin
Centre de Recherche Public-Gabriel Lippmann
CREDI
162a, avenue de la Faiencerie
L-1511 Luxembourg
Tel. (+352) 47 02 61 626
Fax  (+352) 47 02 64
*************************************************************


Hello,

I am trying to use Middlegen with the following DB schema:


Table Persons                                                                    table Reservations
person_id   PK                                                                    reservations_id   PK
                                                                                    person_id_fk      FK
                                                           person_id2_fk    FK


This kind of relationship generates an error when Xdoclet is trying to build the VO because
middlegen repeats the xdoclet tag
@ejb.value-object
   *   aggregate="${plugin.interfacePackage}.${target.baseClassName}LightValue"
   *   aggregate-name="${target.baseClassName}"                                 <----
   *   members="$target.localClassName"
   *   members-name="${target.baseClassName}"                                  <----
   *   match="all"
   *   relation="external"
   *   type="java.util.Collection"
#else
   * @ejb.value-object
   *   aggregate="${plugin.interfacePackage}.${target.baseClassName}LightValue"
   *   aggregate-name="${target.baseClassName}"                              <-----
   *   match="all"
   *   relation="external"


the tags marked with <---- will cause the Xdoclet to generate classes with repeated
variable and methods names

I changed the <---- to "$table.getVariableName($relationshipRole)", this solved the problem
but I didn"t like the outcome.

do you have a better solution?

P.S -> I don"t want to refactor the DB schema


Regards,
Nuno Duarte Santos








Free Magazines

Cisc o News
Receive a free quarterly e-newsletter with exclusive articles on how Cisco IT uses its own products and so lutions to enable the business.
subscribe

Systems Management News , the newspaper for IT systems administration and data center managers! Each issue of Systems Management News is chock-full of news and analysis to help you understand what's happenin g in your field.
subscribe

The Enterprise Newsweekly eWeek is the essential technology information source for builders of e-business.
subscribe

Oracle Magazine Oracle Magazine contains technology strategy articles, sample code, tips, Oracle and partner news, how to articles for developers and DBAs, and more. Oracle (NASDAQ: ORCL) is the world's largest enterprise software company.
subscribe

Total Telecom Total Telecom is "The Economist of the communications industry".
subscribe

Search:
Java, servers, webhosts, VoIP...
more...
<Prev in Thread] Current Thread [Next in Thread>
Google Custom Search

Recently Viewed:
encryption.gpg....    ietf.rfc822/199...    freebsd.devel.i...    lang.haskell.li...    mail.squirrelma...    web.zope.plone....    yellowdog.gener...    text.xml.xalan....    recreation.phot...    kde.devel.educa...    hardware.bus.ca...    printing.ghosts...    voip.peering/20...    assembly/2006-0...    org.user-groups...    culture.interne...    network.i2p/200...    boot-loaders.ya...    xfree86.render/...    qnx.openqnx.dev...    jakarta.velocit...    user-groups.pal...   
Home | blog view | USPTO Patent Archive | advertise | OSDir is an inevitable website. super tiny logo