Yup, I was able to get it to work with the following annotation:
@Version(
strategy=VersionStrategy.VERSION_NUMBER,
column = "version",
extension...@extension(vendorName="datanucleus",
key="field-name",
value="version")})
on the domain class and no annotation on the version column.
On Dec 4, 6:48 pm, ali <[email protected]> wrote:
> Take a look at here
> :http://www.datanucleus.org/products/accessplatform/jdo/orm/versioning...
>
> On Dec 4, 6:34 pm, ali <[email protected]> wrote:
>
>
>
>
>
>
>
> > I am interested to know the answer to this question as well since I'm
> > using JDO with RequesyFactory.
>
> > On Oct 28, 1:26 am, AlexG <[email protected]>
> > wrote:
>
> > > Hi all,
>
> > > first of all, I want to say that I found no example of using the
> > > RequestFactory with JDO. I want to use JDO with the RequestFactory,
> > > so I´m a little disappointed, that there is so less support/examples.
>
> > > I tested the RF with JPA and everything seems to work very well.
> > > So I tryed porting it to JDO.
>
> > > I have several problems, with remove and editing persisted objects.
> > > Querys and persists work very fine at the moment.
>
> > > So the first point, I´m wondering is, I have an version field on my
> > > class.
> > > I used the @Version annotation form the RequestFactory, and
> > > implemented
> > > the needed methods fpr this field. The problem is, when I create and
> > > persist
> > > a new Object, the version field is not set. The value is always null.
> > > Anybody has an example how this works with RF and JDO??
> > > My class looks like this:
>
> > > @PersistenceCapable
> > > class MyClass{
>
> > > ...
>
> > > @PrimaryKey
> > > @Persistent(valueStrategy = IdGeneratorStrategy.IDENTITY)
> > > private Long id;
>
> > > @Version
> > > @Persistent
> > > private Integer version;
>
> > > public void setVersion(Integer version){this.version = version;}
> > > public Integer getVersion(){return this.version;}
>
> > > public Long getId(){return this.id;}
> > > ...
>
> > > }
>
> > > The second problem is, when I call the function getMyClass(Long id)
> > > I get an Error: EntityKeyId is not Base64 encoded.
> > > I don´t know why I get ths Error.
>
> > > So anybody has an idea, how I can get the versioning, and the
> > > getMyClass() to work??
>
> > > Thanks
>
> > > Greets
> > > Alex
--
You received this message because you are subscribed to the Google Groups
"Google Web Toolkit" 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-web-toolkit?hl=en.