I know my chances of getting heard here are slim, but I am at
a dead end, so here goes.
I have a four level hierarchy of objects
PlanPoint
....UserScenario
........Scenario
............Competitor
which have bi-directional one-to-many relationships between
them.
I have made sure that my hibernate mappings and FDS
destination are matched and I definitely need to have managed
associations as the graph of objects will grow large in my
application (and besides, it is good development practice). So I
have a fully formed project (or at least I think I do) and I get a
duplicate object error.
Right at the bottom I have an alternative that I have tried
which gives a different error.
Here is a snippet from my log... it picks up just after the
message arrives
2007-02-05 21:21:10,281 INFO [STDOUT] Hibernate: insert into
COMPETITOR (COMPETITOR_ID, SCENARIO_ID, NAME, X, Y, RADIUS, ACTUAL,
PROPOSITIONS, ORDER_SIZE, CONVERSION_RATE) values (null, ?, ?, ?,
?, ?, ?, ?, ?, ?)
2007-02-05 21:21:10,281 INFO [STDOUT] Hibernate: call
identity()
2007-02-05 21:21:10,312 INFO [STDOUT] Hibernate: insert into
SCENARIO (SCENARIO_ID, TITLE, SEQUENCE, POTENTIAL,
USER_SCENARIO_ID) values (null, ?, ?, ?, ?)
2007-02-05 21:21:10,312 INFO [STDOUT] Hibernate: call
identity()
2007-02-05 21:21:10,359 INFO [STDOUT] Hibernate: insert into
USER_SCENARIO (USER_SCENARIO_ID, TITLE, PLANPOINT_ID, AUTHOR)
values (null, ?, ?, ?)
2007-02-05 21:21:10,359 INFO [STDOUT] Hibernate: call
identity()
2007-02-05 21:21:10,406 INFO [STDOUT] [Flex] Serializing
AMF/RTMP response
Version: 3
(Command method=_error (0) trxId=8)
(Typed Object #0 'flex.messaging.messages.ErrorMessage')
rootCause = (Typed Object #1
'org.hibernate.NonUniqueObjectException')
throwables = (Array #2)
[0] = (Ref #1)
localizedMessage = "a different object with the same
identifier value was already associated with the session:
[pmco.pojos.Competitor#0]"
message = "a different object with the same identifier value
was already associated with the session: [pmco.pojos.Competitor#0]"
identifier = 0
cause = null
throwableCount = 1
entityName = "pmco.pojos.Competitor"
messages = (Array #3)
[0] = "a different object with the same identifier value was
already associated with the session"
destination = "competitor.hibernate"
headers = (Object #4)
correlationId = "BFAF11E0-6121-54BB-A836-93C81DAE7772"
faultString = "Could not invoke sync method on data adapter
for destination 'userscenario.hibernate' due to the following
error: class org.hibernate.NonUniqueObjectException:a different
object with the same identifier value was already associated with
the session: [pmco.pojos.Competitor#0]."
messageId = "78CB9396-9618-519F-8DB0-70D4E53357FE"
faultCode = "Server.Processing"
timeToLive = 0.0
extendedData = null
faultDetail = null
clientId = null
timestamp = 1.17071047039E12
body = null
Anyone got any ideas?
I would provide my mappings and destinations but I can't fit
them in a message