cayenne-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Michael Gentry <mgen...@masslight.net>
Subject Re: Auto-creation of reverse relationships
Date Wed, 29 Feb 2012 02:18:04 GMT
Hi Joe,

EOF had a problem with unintentionally (or unexpectedly) fired faults
loading in extra records (yes, potentially millions), especially when
using addObjectToBothSidesOfRelationshipWithKey, but I've not seen
this happen in Cayenne and I believe I recall Andrus saying it doesn't
happen unless you explicitly trigger a fault -- such as
state.getAddresses().  If you have an Address and do
address.setState(state) you should be fine, even if you have an
explicit or complimentary relationship going the other way (State ->>
Address).

mrg


On Tue, Feb 28, 2012 at 9:05 PM, Joseph Senecal <senecal@apple.com> wrote:
> My concern with the automatic reverse relationships is if adding an object fires a fault.
Firing a fault on a small dimension table could result in attempting to load millions of records
from the detail table into memory. As long as the automatic reverse relationship doesn't do
that, I don't care.
>
> Joe
>
> On Feb 28, 2012, at 4:54 PM, Michael Gentry wrote:
>
>> Hi John,
>>
>> I don't know the answer to your question offhand, but what is the harm
>> that is being caused from your perspective (aside from extra logs on
>> startup)?
>>
>> Thanks,
>>
>> mrg
>>
>>
>> On Tue, Feb 28, 2012 at 5:45 PM, John Huss <johnthuss@gmail.com> wrote:
>>> This comes from EntityResolver.applyDBLayerDefaults().  The commit where
>>> this was introduced (Revision 606720) says:
>>>
>>> "JPA: adding extra step - connecting reverse relationships on Cayenne end
>>> for consistent runtime..."
>>>
>>> So is it OK to turn this off?  Or will things blow up?
>>>
>>> Thanks,
>>> John
>>>
>>> On Wed, Feb 22, 2012 at 1:44 PM, John Huss <johnthuss@gmail.com> wrote:
>>>
>>>> When I start up my Cayenne app, I see messages about it adding reverse
>>>> relationships in places where I have chosen not to define them in the
>>>> DataMap.  I'm wondering why it does this and if it is necessary and if it
>>>> can be turned off.  Here is the message I'm talking about:
>>>>
>>>> 2012-02-22 19:43:02 EntityResolver [INFO] added runtime complimentary
>>>> DbRelationship from Master to Detail
>>>>
>>>> 2012-02-22 19:43:02 EntityResolver [INFO] added runtime complimentary
>>>> ObjRelationship from Master to Detail
>>>>
>>>>
>>>> Thanks,
>>>>
>>>> John
>>>>
>

Mime
View raw message