Can you please enter this as an issue in JIRA?
http://issues.appfuse.org/browse/APF
Matt
On 1/11/07, André Faria <[EMAIL PROTECTED]> wrote:
Hi All,
There is a problem in DaoJpa if you are using a primitive number (int,
double, float, long) @Id the method save always will call merge because the
objId value will return 0, not null...
That's the solution that I finded
Object objId = DaoUtils.getPersistentId(o);
if (objId == null
|| (objId instanceof Integer && objId.equals(0))
|| (objId instanceof Long && objId.equals(0L))
|| (objId instanceof Float && objId.equals(0F))
|| (objId instanceof Double && objId.equals(0D))) {
this.entityManager.persist(o);
} else {
this.entityManager.merge(o);
}
Regards,
André Faria
---------------------------------------------------------------------
To unsubscribe, e-mail:
[EMAIL PROTECTED] For additional
commands, e-mail: [EMAIL PROTECTED]
--
http://raibledesigns.com