
| Key: |
OPENJPA-162
|
| Type: |
Bug
|
| Status: |
Resolved
|
| Resolution: |
Fixed
|
| Priority: |
Major
|
| Assignee: |
Unassigned
|
| Reporter: |
Nick Johnson
|
| Votes: |
0
|
| Watchers: |
0
|
|
If you were logged in you would be able to see more operations.
|
|
|
|
Environment:
|
Using PostgreSQL 8.1 as the database
|
|
| Resolution Date: |
05/Mar/07 08:14 PM
|
|
Using the following annotation:
@OneToMany(mappedBy="root", fetch=FetchType.LAZY)
@OrderBy("objectId ASC")
private List<Message> messages;
I get the exception "Cannot order "net.spatula.tally_ho.model.MessageRoot.messages" on "objectId", because that field is not in the default fetch group. You can only order on fields that will be selected when the related object is loaded."
I should certainly hope that the primary key of the related object is going to be selected when the object is loaded:
@Id
@Column(name = "object_id")
private long objectId;
|
|
Description
|
Using the following annotation:
@OneToMany(mappedBy="root", fetch=FetchType.LAZY)
@OrderBy("objectId ASC")
private List<Message> messages;
I get the exception "Cannot order "net.spatula.tally_ho.model.MessageRoot.messages" on "objectId", because that field is not in the default fetch group. You can only order on fields that will be selected when the related object is loaded."
I should certainly hope that the primary key of the related object is going to be selected when the object is loaded:
@Id
@Column(name = "object_id")
private long objectId;
|
Show » |
made changes - 05/Mar/07 08:14 PM
| Field |
Original Value |
New Value |
|
Resolution
|
|
Fixed
[ 1
]
|
|
Fix Version/s
|
|
0.9.7
[ 12312340
]
|
|
Status
|
Open
[ 1
]
|
Resolved
[ 5
]
|
|