ObjectTransactions version [message #1518] |
Mon, 19 May 2008 11:41  |
Eclipse User |
|
|
|
Originally posted by: ekkehard.gentz-software.de
I've seen that the version attribute of a business object has to be a
String for Riena ObjectTransactions.
I already have a version attribute like
@Version
@Column(name = "CONT_VERSION")
private int version;
and I have no setter, because the version will only be set from the JPA
persistence framework (hibernate in this case).
can I use my JPA version attribute and perhaps only provide a
String getVersion()
to get the version as String ?
or do I need an extra OT version attribute ?
ekke
|
|
|
Re: ObjectTransactions version [message #1605 is a reply to message #1518] |
Tue, 20 May 2008 06:35  |
Eclipse User |
|
|
|
Version is a String so that you can return "1.1" or "a12" as a version. The purpose is to distinguish
different versions of the same object. However that is the returned value. If you already have an int, that
fullfils the same version (the version is modified each time the object is store), you are fine to convert
that int to a String in the getVersion() method.
christian
ekke schrieb:
> I've seen that the version attribute of a business object has to be a
> String for Riena ObjectTransactions.
> I already have a version attribute like
> @Version
> @Column(name = "CONT_VERSION")
> private int version;
> and I have no setter, because the version will only be set from the JPA
> persistence framework (hibernate in this case).
>
> can I use my JPA version attribute and perhaps only provide a
> String getVersion()
> to get the version as String ?
>
> or do I need an extra OT version attribute ?
>
> ekke
>
|
|
|
Re: ObjectTransactions version [message #570636 is a reply to message #1518] |
Tue, 20 May 2008 06:35  |
Eclipse User |
|
|
|
Version is a String so that you can return "1.1" or "a12" as a version. The purpose is to distinguish
different versions of the same object. However that is the returned value. If you already have an int, that
fullfils the same version (the version is modified each time the object is store), you are fine to convert
that int to a String in the getVersion() method.
christian
ekke schrieb:
> I've seen that the version attribute of a business object has to be a
> String for Riena ObjectTransactions.
> I already have a version attribute like
> @Version
> @Column(name = "CONT_VERSION")
> private int version;
> and I have no setter, because the version will only be set from the JPA
> persistence framework (hibernate in this case).
>
> can I use my JPA version attribute and perhaps only provide a
> String getVersion()
> to get the version as String ?
>
> or do I need an extra OT version attribute ?
>
> ekke
>
|
|
|
Powered by
FUDForum. Page generated in 0.03707 seconds