openjpa-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Rick Curtis <curti...@gmail.com>
Subject Re: StateManager setup with embedded entity handling in Cassandra plugin
Date Fri, 08 Apr 2011 01:06:30 GMT
Todd -

I'm somewhat confused as to where you are running into problems. Perhaps you
can write a small unit test that will better describe what you're having
problems with?

Thanks,
Rick

On Wed, Apr 6, 2011 at 7:42 PM, Todd Nine <todd@spidertracks.com> wrote:

> Hi all,
>  I'm having a very difficult time working with embedded entities in
> Cassandra.  Specifically, this is the case where I'm getting very
> strange behavior.    Em = Entity Manager.
>
> em1 created
> em1 begin transaction
> em 1 load User entity , the embedded Address object is correct.
> em 1 complete transaction
>
> User entity is now detached.
>
> Address is updated
>
> em 1 begin transaction
> User is attached
> em 1 flush
>
> em1 commit transaction
>
>
> The Address now has a null entity manager, and all fields are null,
> however it is correct when the entity was passed to the flush operation
> before using StateManager.get(fieldId) to retrieve the embedded object.
>
> For the cassandra plugin in it's first implementation, we're requiring
> all @Embeddable entities to also implement Serializable.  The embedded
> entity value is simply serialized to a column
>
> Here is the embedded column implementation I have created for @Embedded
> and @ElementCollection
>
>
> https://github.com/riptano/hector-jpa/blob/master/src/main/java/com/datastax/hectorjpa/meta/EmbeddedColumnField.java
>
>
> Any guidance would be greatly appreciated.  I know I'm not wiring the
> entity manager correctly during load, I'm just unsure what else I need
> to do.  I've looked at both ElementEmbedValueHandler and
> EmbedFieldStrategy, however I'm not getting anywhere.  Any help would be
> greatly appreciated.
>
> Thanks in advance!
>
> Todd
>
>

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