need @NoSqlIndexed(byKeyOnly=true) #44

deanhiller opened this Issue Dec 20, 2012 · 1 comment


None yet
1 participant

deanhiller commented Dec 20, 2012

I keep needing this so I am finally adding the issue in here.....

I need a property byKeyOnly so when we have a class like this

private UserDbo {

private String id;

 private String email;


where this will create the typical UserDbo table BUT instead of creating a normal index, it will create a table called emailToUserDbo such that I can do a JPA call of query="select u from TABLE as u where = :email" BUT this query ONLY does = and does not < nor > or anything else.

Updating this is also interesting as if email changes you must delete the previous row in the xref table.

The emailToUserDbo table is very key=email and one column with name="value" and value="user row key"

It is VERY important that an index is NOT used as this pattern scales to trillions of UserDbo's where using an index does not



deanhiller commented Dec 20, 2012

actually, allow the user to specify the column name to use as in my case, I am using the column name userkey and others most likely have tables like this as they are useful in some situations. The default should "" and if the default is used, then just use value as the column name.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment