History | Log In     View a printable version of the current page.  
Issue Details (XML | Word | Printable)

Key: COR-746
Type: Bug Bug
Status: Closed Closed
Resolution: Fixed
Priority: Major Major
Assignee: Unassigned
Reporter: Lance Buchan
Votes: 0
Watchers: 0
Operations

If you were logged in you would be able to see more operations.
db4o Core

Java Enum 'ordinal' and 'name' properties stored as null

Created: 02/Aug/07 09:19 AM   Updated: 22/Aug/07 07:46 PM
Component/s: None
Affects Version/s: None
Fix Version/s: Denmark - v6.3

Time Tracking:
Original Estimate: Not Specified
Remaining Estimate: 0h
Time Spent - 4.5h
Time Spent: 4.5h
Time Spent - 4.5h

Environment: Windows XP SP2, JDK1.6.0, db4o6.3.201

Order: 3
Original IDS Estimate: 0.5 IDD
Resolution Date: 22/Aug/07 07:46 PM
First Response Date: 06/Aug/07 04:07 PM
Labels:
Participants: Lance Buchan and Tetyana Loskutova
Number of Attachments: 0
Number of Comments: 1


 Description  « Hide
This issue is fully described in forum id 29290, where no resolution was ever posted.

Java Enum type 'ordinal' and 'name' properties are not stored. When viewing through Object Manager (6.1), these properties are displayed as null. I am not sure if the underlying Enum functionality is working correctly despite this (have not tested), but as a minimum it is confusing since there's no way to tell the identity of an Enum property in the GUI.

E.g.

public enum Values {
  ONE,
  TWO;
}

In object manager, I would expect to see Values.ONE and Values.TWO or at least ONE and TWO when I browse the objects.

I've tested the equivalent using typesafe enum,

public class Values {
  public static final Values ONE = new Values("ONE");
  public static final Values TWO = new Values("TWO");
  private final String id;
  private Values(String id) {
    this.id = id;
  }
}

and in this case the id is stored as expected.

Tested with db4o 6.3.201.

Thanks
Lance Buchan
Tel +27 76 8513 929

 All   Comments   Work Log   Change History      Sort Order: Ascending order - Click to sort in descending order
Tetyana Loskutova - 06/Aug/07 04:07 PM
Document why it is not possible