Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [eclipselink-users] How to use @BasicMap for a HashMap whose key values are entities

See,

http://www.eclipse.org/newsportal/article.php?id=769&group=eclipse.rt.eclipselink#769

BTW - you do not need to cross post, either forum will give you an answer.


Kim L wrote:
> 
> Hi
> 
> I'm new to EclipseLink and I was wondering how should I use EclipseLink's
> @BasicMap annotation for a map whose key value is an entity and the value
> is an Integer?
> 
> Example:
> 
> 
> @Entity
> class A {
> 
>    // This doesn't work, as the key is an entity
>    @BasicMap
>    private Map<B, Integer> myMap = new HashMap<B, Integer>();
> 
> }
> 
> @Entity
> class B {
>  ...
> }
> 
> 


-----
---
http://wiki.eclipse.org/User:James.sutherland.oracle.com James Sutherland 
http://www.eclipse.org/eclipselink/
 EclipseLink ,  http://www.oracle.com/technology/products/ias/toplink/
TopLink 
Wiki:  http://wiki.eclipse.org/EclipseLink EclipseLink , 
http://wiki.oracle.com/page/TopLink TopLink 
Forums:  http://forums.oracle.com/forums/forum.jspa?forumID=48 TopLink , 
http://www.nabble.com/EclipseLink-f26430.html EclipseLink 
Book:  http://en.wikibooks.org/wiki/Java_Persistence Java Persistence 
-- 
View this message in context: http://www.nabble.com/How-to-use-%40BasicMap-for-a-HashMap-whose-key-values-are-entities-tp23119737p23137913.html
Sent from the EclipseLink - Users mailing list archive at Nabble.com.



Back to the top