Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8755877
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T13:56:29+00:00 2026-06-13T13:56:29+00:00

I have a dependent map on my persistant class… I was thinking the indexed=true

  • 0

I have a dependent map on my persistant class… I was thinking the indexed=”true” would cause DN to add an index to the key and value columns on the generated table, but it seems completely ignored. Of course I can manually add the index.. but is there a way to make DN do it for me either via annotations (preferred) or xml?

@Persistent
@Key(types=String.class,indexed="true",index = "key_idx")
@Value(types=String.class,dependent="true",indexed="true",index = "value_idx")
@Join
private Map<String,String> metadata = new HashMap<>();

in response to DN’s comment it is using mysql… here are the relevant logs I can find and the resulting schema… is there something else I can add to help figure out what I’m doing wrong?:

DataNucleus.Datastore.Schema:58 - Column "account_metadata.id_oid" added to internal representation of table.
DataNucleus.Datastore:58 - Field [com.core.data.account.Account.metadata] -> Column(s) [account_metadata.id_oid] using mapping of type "org.datanucleus.store.mapped.mapping.PersistableMapping" (org.datanucleus.store.rdbms.mapping.IntegerRDBMSMapping)
DataNucleus.Datastore.Schema:58 - Column "account_metadata.`key`" added to internal representation of table.
DataNucleus.Datastore:58 - Field [com.core.data.account.Account.metadata] -> Column(s) [account_metadata.`key`] using mapping of type "org.datanucleus.store.mapped.mapping.StringMapping" (org.datanucleus.store.rdbms.mapping.VarCharRDBMSMapping)
DataNucleus.Datastore.Schema:58 - Column "account_metadata.`value`" added to internal representation of table.
DataNucleus.Datastore:58 - Field [com.core.data.account.Account.metadata] -> Column(s) [account_metadata.`value`] using mapping of type "org.datanucleus.store.mapped.mapping.StringMapping" (org.datanucleus.store.rdbms.mapping.ClobRDBMSMapping)

DataNucleus.Datastore.Schema:58 - Validating 2 index(es) for table account_metadata
DataNucleus.Datastore.Schema:58 - Validating 1 foreign key(s) for table account_metadata
DataNucleus.Datastore.Schema:58 - Validating 1 unique key(s) for table account_metadata

CREATE TABLE `account_metadata` (
  `id_oid` int(11) NOT NULL,
  `key` varchar(64) CHARACTER SET latin1 COLLATE latin1_bin NOT NULL,
  `value` mediumtext,
  PRIMARY KEY (`id_oid`,`key`),
  KEY `account_metadata_n49` (`id_oid`),
  CONSTRAINT `account_metadata_fk1` FOREIGN KEY (`id_oid`) REFERENCES `account` (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-13T13:56:30+00:00Added an answer on June 13, 2026 at 1:56 pm

    SVN trunk of DataNucleus now supports indexes on key/value columns of map join tables where the key/value are non-persistent (previously supported for embedded key/values only).

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

We have some Microfocus Cobol.Net applications. We would like to create a dependency map
I have a php class that generates a map image depending on my db
I have a java application where main class is dependent with some other classes.
I have a the following rails models: class Release < ActiveRecord::Base has_many :release_questionnaires, :dependent
I have the following model structure: class Group < ActiveRecord::Base has_many :group_products, :dependent =>
I have the following two models: class Parent < ActiveRecord::Base has_one :child, dependent: :destroy
I have a Tag model: class Tag < ActiveRecord::Base has_many :taggings, :dependent => :destroy
I have a Post model: class Post < ActiveRecord::Base belongs_to :user has_many :taggings, :dependent
I have a Post model: class Post < ActiveRecord::Base belongs_to :user has_many :taggings, :dependent
I have the following models, Member and Map, set up as so: class Member

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.