cayenne-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ken Anderson <ken.ander...@amphorainc.com>
Subject Poorly modeled to-one relationship help
Date Mon, 17 Apr 2017 16:11:38 GMT
All,

We have a situation in our database that seems to require some special tricks in Cayenne to
make work.  One of our developers is having issues with the following situation:

Table                      Primary Key

cost                        cost_num
cost_ext_info       cost_num

The cost_ext_info table just has the same primary key that the cost table has.  We use custom
primary key generation for cost (grabs from another table), but how do we setup the relationship
so the cost_num is propagated from the cost table when we insert both at the same time?

In WO, I would make the relationship to-many, and it would propagate the primary key down.
 If we try that in Cayenne, it still tries to fill in the primary key of cost_ext_info before
propagating apparently (since we’re getting an error that it can’t create a primary key
for cost_ext_info).

Thoughts?  Many thanks in advance.

Ken

Ken Anderson
CTO Amphora, Inc.
Mobile:   +1 914 262 8540

[id:image001.png@01CE8142.D18AEB10]

www.amphorainc.com<http://www.amphorainc.com/>

Confidentiality Notice: This e-mail and accompanying documents contain confidential information
intended for a specific individual and purpose. This e-mailed information is private and protected
by law. If you are not the intended recipient, you are hereby notified that any disclosure,
copying, or distribution, or the taking of any action based on the contents of this information,
is strictly prohibited.
Mime
  • Unnamed multipart/related (inline, None, 0 bytes)
View raw message