openjpa-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Rick Curtis <curti...@gmail.com>
Subject Re: ClassCast exception while iterating over an element collection of embeddables
Date Mon, 23 Jul 2012 13:44:33 GMT
Mark -

Is there any way that you could put together a small standalone unit test
that recreates this issue? I am unable to put a test together that
demonstrates the ClassCastException.

Thanks,
Rick

On Fri, Jul 20, 2012 at 9:05 PM, Mark Youwanes <mark_youwanes@yahoo.com>wrote:

> Hi Rick,
>
> I'm using OpenJPA 2.2.0 and build-time enhancement. The ftp connection is
> getting retrieved eagerly as a member of a ClientRegion object:
>
> @Entity
> @Table(name = "client_region")
> public class ClientRegion extends AbstractNamedEntity {
>
>     private static final long serialVersionUID = 1L;
>
>     public static final String FIND_ALL_BY_CLIENT_NAME_QUERY =
> "ClientRegion.findAllByClientName";
>     public static final String CLIENT_NAME_QUERY_PARAM = "clientName";
>     public static final String STATUS_QUERY_PARAM = "status";
>
>     @Enumerated(EnumType.STRING)
>     @Column(name = "STATUS")
>     private Status status = ACTIVE;
>
>     @ManyToOne
>     @JoinColumn(name = "fk_client_id")
>     private Client client;
>
>     @Column(name = "brand")
>     private String brand;
>
>     @ManyToMany(cascade = {
>             CascadeType.MERGE, CascadeType.PERSIST
>     }, fetch = FetchType.EAGER)
>     @JoinTable(name = "core_client_ftp_connection", joinColumns =
> @JoinColumn(name = "fk_client_region_id"), inverseJoinColumns =
> @JoinColumn(name = "fk_ftp_connection_id"))
>     private Collection<FtpConnection> ftpConnections =
> new ArrayList<FtpConnection>();
>
> ....
>
> I'm using Spring Data JPA to access the objects.
>
> I appreciate your help on this.
>
>
>
> Mark
>
>
>
>
>


-- 
*Rick Curtis*

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message