• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Exception Updating Rows When Qualifier Has Relationship
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Exception Updating Rows When Qualifier Has Relationship


  • Subject: Re: Exception Updating Rows When Qualifier Has Relationship
  • From: Chuck Hill <email@hidden>
  • Date: Thu, 12 May 2016 21:34:13 +0000
  • Thread-topic: Exception Updating Rows When Qualifier Has Relationship

Hi Luiz,

 

This is in the JavaDoc for this method:

     * Updates rows described by the qualifier. Note that the values and the qualifier need to be on an attribute

     * and not on a relationship level. I.e. you need to give relationshipForeignKey = pk of object instead of

     * relatedObject = object. The newValues dictionaries also holds foreign keys, not objects.

 

 

Chuck

 

From: <webobjects-dev-bounces+chill=email@hidden> on behalf of Luiz Alfredo Carrara Bertusso <email@hidden>
Date: Thursday, May 12, 2016 at 1:52 PM
To: "email@hidden" <email@hidden>
Subject: Exception Updating Rows When Qualifier Has Relationship

 

Hello, I`ve been trying to use the method updateRowsDescribedByQualifier of ERXEOAccessUtilities class but I`m facing a problem.

The method updateRowsDescribedByQualifier requires the following parameters: an EOEditingContext, a String that represents an entity name, a qualifier and a NSDictionary of target fields to be updated.

The problem I`m facing is that in my qualifier I`m using a relationship, the qualifier is Activity.OWNER.is(user);, in this case OWNER is the relationship between Activity and User.

As exception I`m getting the following stack trace: 

 

java.lang.IllegalStateException: sqlStringForKeyValueQualifier: attempt to generate SQL for er.extensions.qualifiers.ERXKeyValueQualifier (owner = (User)'<User pk:"5">') failed because attribute identified by key 'owner' was not reachable from from entity 'Activity'

at com.webobjects.eoaccess.EOSQLExpression.sqlStringForKeyValueQualifier(EOSQLExpression.java:1632)

at com.webobjects.eoaccess.EOQualifierSQLGeneration$_KeyValueQualifierSupport.sqlStringForSQLExpression(EOQualifierSQLGeneration.java:463)

at er.extensions.ERXExtensions$KeyValueQualifierSQLGenerationSupport.sqlStringForSQLExpression(ERXExtensions.java:346)

at com.webobjects.eoaccess.EOQualifierSQLGeneration$Support._sqlStringForSQLExpression(EOQualifierSQLGeneration.java:165)

at com.webobjects.eoaccess.EOSQLExpression.prepareUpdateExpressionWithRow(EOSQLExpression.java:885)

at com.webobjects.eoaccess.EOSQLExpressionFactory.updateStatementForRow(EOSQLExpressionFactory.java:155)

at com.webobjects.jdbcadaptor.JDBCChannel.updateValuesInRowsDescribedByQualifier(JDBCChannel.java:175)

at er.extensions.eof.ERXEOAccessUtilities$2.doPerform(ERXEOAccessUtilities.java:1640)

at er.extensions.eof.ERXEOAccessUtilities$ChannelAction.perform(ERXEOAccessUtilities.java:1586)

at er.extensions.eof.ERXEOAccessUtilities.updateRowsDescribedByQualifier(ERXEOAccessUtilities.java:1643)

 

Could someone help me to understand a way to solve this?

 

Thanks.

 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

  • Follow-Ups:
    • Re: Exception Updating Rows When Qualifier Has Relationship
      • From: Luiz Alfredo Carrara Bertusso <email@hidden>
References: 
 >Exception Updating Rows When Qualifier Has Relationship (From: Luiz Alfredo Carrara Bertusso <email@hidden>)

  • Prev by Date: Exception Updating Rows When Qualifier Has Relationship
  • Next by Date: Re: Exception Updating Rows When Qualifier Has Relationship
  • Previous by thread: Exception Updating Rows When Qualifier Has Relationship
  • Next by thread: Re: Exception Updating Rows When Qualifier Has Relationship
  • Index(es):
    • Date
    • Thread