0 Replies Latest reply on Apr 6, 2005 10:26 PM by Yevgeny Shakhnovich

    DVC Primary Key

    Yevgeny Shakhnovich Newbie

      Hi,
      I have a problem with DVC primary key that contains another DVC as a property.

       <dependent-value-class>
       <class>
       com.lanterncom.rms.config.service.VirtualPortContentPK
       </class>
      
       <property>
       <property-name>m_virtualPort</property-name>
       </property>
      
       <property>
       <property-name>m_domainPortIndex</property-name>
       </property>
       </dependent-value-class>
      
      


      where m_virtualPort is another DVC (actually, it is another primary key for a different entity)
       <dependent-value-class>
       <class>
       com.lanterncom.rms.config.service.VirtualPortPK
       </class>
       <property>
       <property-name>m_manDomainIndex</property-name>
       </property>
       <property>
       <property-name>m_fwdServiceIndex</property-name>
       </property>
       <property>
       <property-name>m_vPortIndex</property-name>
       </property>
       </dependent-value-class>
      

      All simple properties are integers.

      Method findByPrimaryKey on VirtualPortContent does not work. For example, I look for key <<1.2.3>.4>, where <1.2.3> is a value of m_virtualPort. LogInterceptor displays the correct value <<1.2.3>.4> for the search, but in DB, the search is invoked using <1.1.1>.4>

      I traced it upto org.jboss.ejb.plugins.cmp.jdbc.QueryParameter.set(..) Until it, the value of the argument is correct. QueryParameter properly divides fields according the properties, but for all fields of DVC VirtualPortPK it always takes the value of the first field (1).

      Is it a bug or I do something wrong?

      I use JBoss 3.2.7R1

      Thanks,
      Yevgeny