I tried to implement unowned one to many relationship using column alias as
explained here
http://gae-java-persistence.blogspot.com/2010/02/truth-about-joins.html
Here's my code
@Entity
public class User extends BaseEntity implements UserDetails {
@Basic
private Set<String> _roles = new HashSet<String>();
@OneToMany()
@Column(name="roles", insertable=false, updatable=false)
private Set<Role> _roleAlias;
--- getters, setters
}
Here the entities have encoded strings as primary keys.
But it does not work, id's of role is saved in _roles. when object is
fetched again, role ids would be available in _roles list
but _roleAlias would be always empty.
What's going wrong !!
--
Sudhir Ramanandi
http://www.ramanandi.org
--
You received this message because you are subscribed to the Google Groups
"Google App Engine for Java" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/google-appengine-java?hl=en.