stariy95 commented on PR #615:
URL: https://github.com/apache/cayenne/pull/615#issuecomment-2110639172

   HI @Jugen, thank you for another PR.
   
   I like the overall idea, but in this case we need something more elaborate. 
`CayennePath` is a good hack, but it's not supposed to be used for a model 
specific information like that. Moreover, I don't even like the whole marker 
thing in the paths and hope to get rid of the single marker there is now.
   
   Giving this feature a bit thought, I think we need to add this information 
explicitly to the model and rewrite all the flattened ids logic to use it.
   
   Here's some ideas I have.
   We could keep more information in the `ClassDescriptor` instead of just path 
-> entity pairs:
   ```java
   class AdditionalEntityDescriptor {
       CayennePath path;
       DbEntity entity;
       boolean noDelete;
   }
   ```
   
   And keep a reference to it (maybe we could get away by just looking it up by 
path?) when we are tracking flattened ids in the `ObjectStore`:
   ```java
   class FlattenedId {
       AdditionalEntityDescriptor flattenedEntity;
       ObjectId id;
   }
   ```
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscr...@cayenne.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to