Ordered - JDO Metadata Extension

I am having problems getting a collection staying ordered after it is
stored.
I', having a class defined this way:
<!-- Group -->
<class name="Group" persistence-capable-superclass="WebSource">
<field name="children">
<collection element-type="WebSource"/>
<extension vendor-name="kodo" key="ordered" value="true"/>
<extension vendor-name="kodo" key="inverse" value="parent"/>
</field>
</class>
Af far as I can read from the documentation, the 'ordered' metadata
extension should guarantee that the collection should stay ordered. Any
suggestions why this isnt the case?
btw, Im using Kodo 2.2.6, SQL server 2000 :)

Benny --
There is currently no support for ordering 1-M relations like the one you describe. Only collections of simple types and 1-sided M-M relations are supported with ordering. We are however, working on 1-M ordering; watch for it in a future release.

Similar Messages

  • Sort metadata extension return list

    I have developed a custom metadata extension which I will use for several metadata properties.
    As a basis for the metadata extension I used the example (for Dynamic values) provided here:
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/library/unkown/implementing a metadata extension for kmc properties.article
    I have extended the example so that it serves for multiple metadata properties and multiple languages.
    Now I would like to sort the IMetaValueList returned by
    getAllowedValues(IMetaName metaName, IMetaContext metaContext)
    I want to sort this list of keys by the labels of the locale in which a user is logged on, so that for instance a dropdownlistbox shows the items in alphabetical order.
    I think I can accomplish this by using
    metaContext.getResourceContext().getLocale()
    to get the locale, and using
    sort(Comparator c)
    in IMetaValueList with a custom Comparator.
    The custom Comparator would compare two keys, based on their corresponding labels (
    getValueLabel(IMetaValue metaValue, Locale locale)
    However, before I start implementing this, I need to know:
    -In custom iViews, currently I use
    IMetaValueListIterator allowedValues =metaName.allowedValueIterator();
    where metaName is an IMetaName which uses the metadata extension.
    For the sort function to work I need to use
    allowedValueIterator(IMetaContext metaContext);
    How do I get an IMetaContext in my custom portal component?
    -Is there another way to sort the IMetaValueList returned by the metadata extension?
    Johan

    Anyone? Any help will be appreciated...
    Johan

  • Existing table metadata extensions ignored

    I have tried to use kodo metadata extensions to map objects to existing
    tables.
    I used extensions from the Kodo documentation example.
    First I run schema tool with refresh option and complete schema was
    generated (tables with X at the end), as all extension instructions were
    ignored.
    After that I run schema tool with register option. This time an exception
    was thrown showing a SQL statement looking for tables with X at the end.
    Again it looks as extension instructions from jdo file were ignored.
    Could someone define required steps when using an existing schema and what
    should be done so Kodo starts using metadata extensions?
    Thanks.

    There are no special steps to starting to use metadata extensions. Is it
    possible that you have another set of metadata without extensions lying around,
    and Kodo is picking that one up?
    Or perhaps you could post your metadata, so we can see if there are any
    errors in it.

  • Custom Metadata Extension with RFC call

    Hi all,
    I am trying to create a custom metadata extension that pulls data from ECC via an RFC call and returns values as a IMetaValueList in the getAllowedValues method.
    Does anybody have any experience?
    Thx
    Ismail

    Hello Sanjeev,
    - I Kept External break point in SRM where we are calling RFC Call for ECC, I am able to debug untill the RFC call,
    - But, on RFC Call ( CALL FUNCTION ZABC destination <Destination>), when I press F5 it is not going inside the function module.
    - I am getting Export parameter values, means ctrl is going to ECC, but not able to debugg our BE system -ECC.
    Pls suggest. Thanks for your quick reply.
    Regards,
    Mohan Vamsi

  • Problem: CM properties translation through Metadata Extensions

    Hi.
    I encountered a problem with CM properties translation using metada extensions.
    The translation as it is goes fine, however, sorting does not.
    I have a property, that is created in Language1, which has some allowed values. That property is used in one of the xml forms. Its allowed values are displayed in this form sorted accordingly when portal is viewed in Language1.
    I added metadata extension, where allowed values from property are translated into Language2.
    When portal user swithes to Language2, translation kicks in, but the values are not sorted accordingly in Language2. They remain sorted as they were in their original language - Language1.
    Problem: how to make portal (xml form) use the properly sorted property in any chosen language?
    Lucas

    Hi.
    I encountered a problem with CM properties translation using metada extensions.
    The translation as it is goes fine, however, sorting does not.
    I have a property, that is created in Language1, which has some allowed values. That property is used in one of the xml forms. Its allowed values are displayed in this form sorted accordingly when portal is viewed in Language1.
    I added metadata extension, where allowed values from property are translated into Language2.
    When portal user swithes to Language2, translation kicks in, but the values are not sorted accordingly in Language2. They remain sorted as they were in their original language - Language1.
    Problem: how to make portal (xml form) use the properly sorted property in any chosen language?
    Lucas

  • Metadata Extension

    Can i in the same portal project add more than one class to metadata extension ? How do i generate the prjconfig file ? I tryed to add another class in the example project bellow but it didn't work.
    There is any other thing that i should do ?
    What is the schedulertask that is in the src.config folder in the example project ?
    What is the IRFServiceWrapper class ?
    The following tutorial shows how to implement metadata extension: https://media.sdn.sap.com/html/submitted_docs/nw_kmc/howto/km/metadataextension/Implementing%20a%20Metadata%20Extension%20for%20KMC%20Properties.html

    !

  • Use of the ordered metadata extension

    Hey Kodo,
    I noticed your ordered and order-column extensions in the manual. I'd
    really, really, really like to use these props for a Vector of child objects
    so I don't have to maintain the order column myself. The documentation
    mentions however that these properties are not available for 1-many Object
    collections but only for collections of simple values etc. Can you tell me
    whether future versions of Kodo will support this, and if so, when?
    Greetings,
    Martin van Dijken

    David-
    Better yet, this limitation no longer exists in 3.0.
    In article <[email protected]>, David Ezzio wrote:
    Hi Marc,
    It's more than six months later, and this is an important insight that needs to be in your
    documentation.
    David
    Marc Prud'hommeaux wrote:
    Martin-
    The documentation is a bit misleading: we do support the order column in
    relations. The only limitation is that you cannot have the one-to-many
    optimization with the "inverse" attribute and use ordering at the same
    time. But if you have a join table (or use Kodo's default generated
    schema), then you should be able to specify ordering on your relations
    just fine.
    In article <b2d9o4$cdn$[email protected]>, Martin van Dijken wrote:
    Hey Kodo,
    I noticed your ordered and order-column extensions in the manual. I'd
    really, really, really like to use these props for a Vector of child objects
    so I don't have to maintain the order column myself. The documentation
    mentions however that these properties are not available for 1-many Object
    collections but only for collections of simple values etc. Can you tell me
    whether future versions of Kodo will support this, and if so, when?
    Greetings,
    Martin van Dijken
    Marc Prud'hommeaux [email protected]
    SolarMetric Inc. http://www.solarmetric.com
    Marc Prud'hommeaux [email protected]
    SolarMetric Inc. http://www.solarmetric.com

  • Upload window - setting order of metadata groups

    reconfiguring a FCS...
    At the upload screen, I know how to pick the default Metadata Set (pull down above the entry screen) but I am trying to reorder/remove the Metadata Groups to the left of the entry fields. Right now the "Asset" group is at the top.
    Suggestions?
    Thanks

    I guess I needed to rephrase my question a bit. I knew about the order but I was seeing extra stuff.
    Here was the problem:
    For uploading I have a Metadata set called DaMaster. Within that Metadata set was only one group called DaMaster_Info. So I assumed that when a user would go to upload the only field they would see for data entry were the ones called out in the DaMaster_Info metadata group.
    But when they get the screen they see Asset, DaMaster_Info and Versioning. I don't mind the extra ones but just wanted to have DaMaster_Info first.
    I ended up changing the Display Priority to 0 and that got me where I needed to be.
    Thanks for your response.

  • Sales order partner vbpa extension help

    Hi Gurus,
    sorry one correction
    As per my client requirement i have to extend VBPA structure for the Z-field .
    We had already place the new z-field in the sales order header partner address subscreen.
    So now i  have to get that field value and populate into vbpa-new zfield.
    Please check and advice where to put the code for newly added z-field from transaction VA01/VA02.
    Best Regards,
    Radhakrishna.
    Edited by: Radhakrishna Javangula on Apr 26, 2010 4:03 PM

    search the forum for MANY posts on SD exits and enhancements....

  • Metadata extensions for validation

    Hi all,
    I have implemented a IValidation class for some custom logic to validate some predefined properties.
    I found that the code is called if the property is set to "Mandatory", but NOT called when the property is not mandatory.
    Is this the expected behaviour that only mandatory properties will trigger the IValidation class?

    Hi all,
    Any helps?

  • Sales Order Change BAPI Extension for Customer Fields

    Hello!
    I am working on customer field enhancement for BAPI_salesorder_change. The extensionin parameter has more than 1000 characters (fields in the structure BAPE_VBAP) and hence, the two fields that I added to VBAP (using append structure) are not getting the data.
    I have followed all the steps that was given in the documentation to fill extensionin like adding the fields to VBAPKOZ and BAPE_VBAP. This is the logic I have used to fill EXTENSIONIN:
    BAPE_VBAP-VBELN = P_order.
    BAPE_VBAP-POSNR = i_vbap-posnr.
    BAPE_VBAP-ZZSTART_DT = sy-datum.
    BAPE_VBAP-ZZdnload_DT = sy-datum.
    T_EXTEN-STRUCTURE = 'BAPE_VBAP'.
    *T_EXTEN+30 = BAPE_VBAP.
    T_EXTEN-valuepart1 = bape_vbap.
    T_EXTEN-valuepart2 = bape_vbap+240(240).
    T_EXTEN-valuepart3 = bape_vbap+480(240).
    T_EXTEN-valuepart4 = bape_vbap+720(240).
    APPEND T_EXTEN.
    Clear t_exten.
    BAPE_VBAPX-VBELN = P_order.
    BAPE_VBAPX-POSNR = i_vbap-posnr.
    BAPE_VBAPX-ZZSTART_DTX = 'X'.
    BAPE_VBAPX-ZZdnload_DTX = 'X'.
    T_EXTEN-STRUCTURE = 'BAPE_VBAPX'.
    T_EXTEN-valuepart1 = bape_vbapx.
    APPEND T_EXTEN.
    CALL FUNCTION 'BAPI_SALESORDER_CHANGE'
    EXPORTING
    salesdocument = p_order
    order_header_inx = ORDER_HEADERX
    tables
    return = T_RETURN
    *ORDER_ITEM_IN = T_LINE
    *ORDER_ITEM_INX = T_LINEX
    EXTENSIONIN = T_EXTEN.
    CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'
    I guess there is 960 character limitation for BAPIPAREX structure but I would like to know if there is a way to work around it.
    Thanks to all for your time.

    Found BAPI myself...... BAPI_SALESORDER_CHANGE

  • Kodo 3.0.0 Released

    Hello All,
    SolarMetric is happy to announce the general availability of Kodo JDO 3.0.0.
    The latest version of Kodo JDO is the most powerful ever. Full release notes
    can be found at http://docs.solarmetric.com/relnotes.html. A list of the
    major changes can be found at the bottom of this email. If you have a valid
    and up-to-date maintenance and support contract, you can download the latest
    release at http://www.solarmetric.com/Software/Purchase/download.php.
    If you don't, please contact your sales representative
    ([email protected]) to determine how to upgrade.
    Major changes in Kodo JDO 3.0.0 include:
    - Kodo now supports direct SQL queries and stored procedure calls through
    the javax.jdo.Query interface.
    - Technology preview of Kodo Management / Monitoring capability.
    - JRun 4 is now supported.
    - Built-in support for Borland JDataStore, as well as Microsoft Access and
    Microsoft Visual FoxPro (using a JDBC-ODBC server bridge like DataDirect,
    but not the Sun JDBC-ODBC bridge).
    - Refactored data caching to not lock the cache as a whole when loading data
    from it or storing data into it. This change improves the concurrency of the
    cache.
    - Support for detaching and attaching instances from a persistence manager,
    allowing applications to more easily use a "data transfer object" pattern.
    - Support for collection and map fields that are backed by large result
    sets.
    - Support for additional settings to control the handling of large result
    sets.
    - Better exception messages when mappings can't be found or fail validations
    against the schema.
    - Expanded smart proxies to include change-tracking for lists.
    - New externalization system for storage of field types not supported by JDO
    without resorting to serializing or requiring custom mappings. Replaces the
    old stringification mapping.
    - Support for aggregates and projections in queries. See the Query
    Aggregates and Projections documentation for more details.
    - New mapping system, providing more flexible mapping options.
    - Pluggable system for storing mapping information, with built-in options
    for storing mapping information in the database, in JDO metadata extensions,
    and in a separate mapping file. See the section on the Mapping Factory for
    more information.
    - Support for embedded 1-1 mappings, including nested embedded mappings with
    no limit on nesting depth. See the section on Embedded One-to-One Mapping
    for more information.
    - Support for timestamp and state-based optimistic lock versioning, and for
    custom versioning systems. See the section on Version Indicators for more
    information.
    - Configurable eager fetching of 1-1, 1-many and many-many relations.
    Potentially reduces the number of database queries required when iterating
    through an extent or query result and accessing relation fields of each
    instance.
    - Improved documentation and error messaging.
    Enjoy,
    -Greg

    Hi,
    This plug in will it works with Kodo 4.0.1 and maven 1.0.2?
    Thanks
    Guy

  • RC1 and MetaDataMappingFactory

    I'm trying to migrate from 2.5.3 to 3.0RC1.
    To use only the old 2.5.3 package.jdo file including mapping information
    instead of additionally my newly generated .mapping file, I've set
    'metadata' as MappingFactory.
    Compiling my queries, I get
    kodo.jdbc.meta.MappingInfoNotFoundException: No mapping information was
    found for "class thisIsMyClass".
         at
    kodo.jdbc.meta.RuntimeMappingProvider.getMapping(RuntimeMappingProvider.java:43)
         at
    kodo.jdbc.meta.MappingRepository.getMappingInternal(MappingRepository.java:342)
         at kodo.jdbc.meta.MappingRepository.getMapping(MappingRepository.java:297)
         at
    kodo.jdbc.meta.MappingRepository.getMappings(MappingRepository.java:272)
         at
    kodo.jdbc.meta.MappingRepository.getMetaDatas(MappingRepository.java:256)
         at kodo.query.QueryImpl.internalCompile(QueryImpl.java:559)
         at kodo.query.QueryImpl.compile(QueryImpl.java:523)
    If I add a .mapping file with the default FileMappingFactory everything
    works fine. The new mapping file was generated with kodo2migrator.
    Did I misunderstand the documentation or is this an RC1-error?

    Did you use the mappingtool to import the .mapping file created with
    kodo2migrator into .jdo metadata extensions?I've mapped the mapping information back to the .jdo-files, removed the
    mapping files and tried to start again with "kodo.jdbc.MappingFactory:
    metadata". Unfortunately it did not work.
    I'm using Oracle 9.2.0.1.0.
    The only properties set next to metadata are:
    javax.jdo.option.NontransactionalRead=true
    javax.jdo.option.RetainValues=true
    javax.jdo.option.Optimistic=true
    javax.jdo.PersistenceManagerFactoryClass=kodo.jdbc.runtime.JDBCPersistenceManagerFactory
    If I add the property
    kodo.jdbc.SchemaFactory=dynamic
    to prevent schema synchronization everything next to a bug I'll report
    later works fine. I can read + (partially) write to the database.
    Here's the stack trace, the .jdo-files come below:
    kodo.MetaData :INFO: Parsing metadata resource
    "jar:file:/myjar.jar!/firstpackage/package.jdo".
    kodo.MetaData :INFO: Parsing metadata resource
    "jar:file:/myjar.jar!/secondpackage/package.jdo".
    kodo.jdbc.Schema :INFO: Generating tables for schema name "null", table
    name "APPLICATION".
    kodo.jdbc.Schema :INFO: Generating column information for table
    "GAMBLE.APPLICATION".
    kodo.jdbc.Schema :INFO: Generating tables for schema name "null", table
    name "ZSYS_INTERCEPTOR".
    kodo.jdbc.Schema :INFO: Generating column information for table
    "GAMBLE.ZSYS_INTERCEPTOR".
    kodo.jdbc.meta.MappingInfoNotFoundException: The mapping for field
    "secondpackage.InterceptorDefImpl.application" is missing information on
    how to link the field to the related class table, or the given information
    is invalid.
         at kodo.jdbc.meta.Mappings.invalidMapping(Mappings.java:89)
         at kodo.jdbc.meta.Mappings.invalidMapping(Mappings.java:75)
         at
    kodo.jdbc.meta.OneToOneFieldMapping.fromMappingInfo(OneToOneFieldMapping.java:98)
         at
    kodo.jdbc.meta.RuntimeMappingProvider.getFieldMapping(RuntimeMappingProvider.java:156)
         at
    kodo.jdbc.meta.MappingRepository.getFieldMapping(MappingRepository.java:410)
         at kodo.jdbc.meta.ClassMapping.getFieldMapping(ClassMapping.java:1048)
         at kodo.jdbc.meta.ClassMapping.getMappings(ClassMapping.java:1018)
         at
    kodo.jdbc.meta.ClassMapping.getDeclaredFieldMappings(ClassMapping.java:781)
         at kodo.jdbc.meta.ClassMapping.resolve(ClassMapping.java:936)
         at kodo.jdbc.meta.BaseClassMapping.resolve(BaseClassMapping.java:302)
         at kodo.jdbc.meta.MappingRepository.resolve(MappingRepository.java:381)
         at kodo.jdbc.meta.MappingRepository.getMapping(MappingRepository.java:298)
         at
    kodo.jdbc.meta.MappingRepository.getMappings(MappingRepository.java:272)
         at
    kodo.jdbc.meta.MappingRepository.getMetaDatas(MappingRepository.java:256)
         at kodo.query.QueryImpl.internalCompile(QueryImpl.java:559)
         at kodo.query.QueryImpl.compile(QueryImpl.java:523)
    ---------------- First mapping file
    <jdo>
    <package name="firstpackage">
    <class name="ApplicationDefImpl">
    <extension vendor-name="kodo" key="class-column" value="none"/>
    <extension vendor-name="kodo" key="jdbc-class-map"
    value="base">
    <extension vendor-name="kodo" key="pk-column" value="ID"/>
    <extension vendor-name="kodo" key="table"
    value="APPLICATION"/>
    </extension>
    <extension vendor-name="kodo" key="jdbc-version-ind"
    value="version-number">
    <extension vendor-name="kodo" key="column"
    value="VERSION"/>
    </extension>
    <extension vendor-name="kodo" key="lock-column"
    value="VERSION"/>
    <extension vendor-name="kodo" key="pk-column" value="ID"/>
    <extension vendor-name="kodo" key="table" value="APPLICATION"/>
    <field name="interceptors">
    <collection
    element-type="secondpackage.InterceptorDefImpl"/>
    <extension vendor-name="kodo" key="inverse"
    value="application"/>
    <extension vendor-name="kodo" key="jdbc-field-map"
    value="one-many">
    <extension vendor-name="kodo" key="ref-column.ID"
    value="APPLICATION_ID"/>
    <extension vendor-name="kodo" key="table"
    value="ZSYS_INTERCEPTOR"/>
    </extension>
    </field>
    </class>
    </package>
    </jdo>
    ---------------- Second mapping file
    <jdo>
    <package name="secondpackage">
    <class name="InterceptorDefImpl">
    <extension vendor-name="kodo" key="class-column" value="none"/>
    <extension vendor-name="kodo" key="jdbc-class-map"
    value="base">
    <extension vendor-name="kodo" key="pk-column" value="ID"/>
    <extension vendor-name="kodo" key="table"
    value="ZSYS_INTERCEPTOR"/>
    </extension>
    <extension vendor-name="kodo" key="lock-column" value="none"/>
    <extension vendor-name="kodo" key="pk-column" value="ID"/>
    <extension vendor-name="kodo" key="table"
    value="ZSYS_INTERCEPTOR"/>
    <field name="interceptor" persistence-modifier="none"/>
    <field name="application">
    <extension vendor-name="kodo" key="data-column"
    value="APPLICATION_ID"/>
    <extension vendor-name="kodo" key="jdbc-field-map"
    value="one-one">
    <extension vendor-name="kodo" key="column.JDOIDX"
    value="APPLICATION_ID"/>
    </extension>
    </field>
    </class>
    </package>
    </jdo>

  • Using cache just for some classes

    Hi,
    I'd like to use datastore cache just for some persistent objects. The
    cache should be active just for some objects and disabled for some other
    objects.
    The only one way I found is the following: I defined the default cache
    time-out to 0 millisecs and this value is overridden for a particular
    class in the jdo metadata.
    For example, these are the global properties:
         <config-property name="dataCache" value="true"/>
         <config-property name="dataCacheTimeout" value="0"/>
    and this is the jdo metadata:
    <extension vendor-name="kodo" key="data-cache-timeout" value="10000"/>
    It works, but I don't like it. I'd like to turn off the cache in some way
    for classes that doesn't need it. I tryed to create a custom cache in this
    way:
    <config-property name="dataCache" value="false, true(Name=myCache)"/>
    or
    <config-property name="dataCache" value="false(Name=default),
    true(Name=myCache)"/>
    but Kodo says that a cache named "default" must be configured and error is
    raised.
    What happens when the cache timeout is 0? If the cache is read every time
    with 0 hits, I think that this is no good for performances, it would be
    better not reading the cache at all...

    Your best bet is to use the data-cache metadata extension in those
    classes that you don't want cached:
    <class name="MyVolatileClass">
    <extension vendor-name="kodo" key="data-cache" value="false"/>
    </class>
    If most of your classes should not be cached, you could also set the
    default cache's size (and soft reference size) to zero. This will,
    however, incur a small performance overhead.
    -Patrick
    Claudio Tasso wrote:
    Hi,
    I'd like to use datastore cache just for some persistent objects. The
    cache should be active just for some objects and disabled for some other
    objects.
    The only one way I found is the following: I defined the default cache
    time-out to 0 millisecs and this value is overridden for a particular
    class in the jdo metadata.
    For example, these are the global properties:
         <config-property name="dataCache" value="true"/>
         <config-property name="dataCacheTimeout" value="0"/>
    and this is the jdo metadata:
    <extension vendor-name="kodo" key="data-cache-timeout" value="10000"/>
    It works, but I don't like it. I'd like to turn off the cache in some way
    for classes that doesn't need it. I tryed to create a custom cache in this
    way:
    <config-property name="dataCache" value="false, true(Name=myCache)"/>
    or
    <config-property name="dataCache" value="false(Name=default),
    true(Name=myCache)"/>
    but Kodo says that a cache named "default" must be configured and error is
    raised.
    What happens when the cache timeout is 0? If the cache is read every time
    with 0 hits, I think that this is no good for performances, it would be
    better not reading the cache at all...

  • Kodo extensions in metadata

    I have been going thru mails in the newsgrp, for help in my work and I
    found a lot of extensions used (r they only kodo-specific). I have gone
    thru all of the documentation tht comes with 2.2 release but havent a
    documentation for this extensions. Where can i find them.
    Amol.

    "Amol" <[email protected]> writes:
    I have been going thru mails in the newsgrp, for help in my work and I
    found a lot of extensions used (r they only kodo-specific). I have gone
    thru all of the documentation tht comes with 2.2 release but havent a
    documentation for this extensions. Where can i find them.The JDO standard defines a syntax for adding vendor-specific metadata to
    the JDO metadata files. So yes, the extensions that you are referring to
    are Kodo-specific.
    Most of our vendor extensions are used for controlling the
    object-relational mapping that Kodo performs.
    Look in the metadata and existing schema sections of the 2.2.2
    documentation for more information on possible extensions. The 2.2.3
    documentation is formatted slightly differently; it contains an appendix
    with a list of all extensions supported by Kodo.
    -Patrick
    Patrick Linskey [email protected]
    SolarMetric Inc. http://www.solarmetric.com

Maybe you are looking for