Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [eclipselink-users] FetchGroups with a transient attribute

If usersName is composed of the values of other attributes and not mapped, why is it in the fetch group at all. Just put the attributes that compose it in the fetch group. When that fetch group is fetched, you'll be able to compose that attribute.

There is no way for EclipseLink to know how usersName is composed, so it can't deal with it in the fetch group.

-Tom

On 03/07/2012 2:12 PM, Cozart, Michele L wrote:
I’m trying to retrieve a cursor that returns a fetch group where one of the
attributes is transient. I get the error message:

Attribute usersName of FetchGroup(usersName){usersName, userId} is not mapped.
The transient field is usersName which is a concatenation of lastname, firstname
etc. from the users table.

Here’s what I have:

@Entity

@Table(name = "USERS")

@FetchGroup(name="usersName", attributes={

@FetchAttribute(name="userId"),

@FetchAttribute(name="usersName")})

@Transient

private String usersName; // getters and setters used

How do I do this?

Thanks,

Michele



_______________________________________________
eclipselink-users mailing list
eclipselink-users@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/eclipselink-users


Back to the top