google-code-export / objectify-appengine

Automatically exported from code.google.com/p/objectify-appengine
MIT License
1 stars 0 forks source link

Index annotation on subclasses currently override base-class annotations #58

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
@Unindexed 
Class Base 
{ 
    @Id 
    String a; 
    String b; 
} 

@Indexed 
Class Sub extends Base 
{ 
    String c; 
} 

What is the expected output? What do you see instead?
"a" and "c" should be indexed with "b" being unindexed. Instead all 3 fields 
are indexed (fyi, didn't actually test this but Jeff S. confirmed the behavior, 
see link below)

What version of the product are you using? On what operating system?
Objectify 2.2.2 and appengine sdk 1.3.8

Please provide any additional information below.
http://groups.google.com/group/objectify-appengine/browse_thread/thread/98a95882
9e82913

Original issue reported on code.google.com by Segun.So...@gmail.com on 27 Oct 2010 at 3:43

GoogleCodeExporter commented 9 years ago
This is checked into trunk and will be part of 3.0b2.

Now in this situation a&b will be unindexed, c will be indexed.

A remaining question exists if Sub has no @Indexed annotation, should it 
inherit the @Unindexed default from Base or should fields be indexed by default 
like every other class.  There is a discussion in the Google Group about this.

The new behavior (per trunk) is that absent an annotation, subclasses are 
indexed by default no matter what the parent says.

Original comment by lhori...@gmail.com on 18 Mar 2011 at 4:10