I almost got it. Entity2 is an observableObject, so I can stick
@ObservedObject var entity2 = Entity2()
in View1. Then in View2 I can put
@ObservedObject var xentity2: Entity2
In View2 I pick the Entity2 I want to use and... You can't do
xentity2 = entity2
But, I could just write a copy function for Entity2 and just do xentity2.copy(xentity2). Great, but Entity2 is a class generated by CoreData and I have no idea what stuff CoreData may have put in the class since all I have is an extension to the class, to say nothing of they may cnage it in the future.
The work around I see is create a class of my own that contains what is required to find a Entity2 in CoreData. Use that to pass data between View1 and View2. In View2 I get the Entity2, from CoreData, copy the parts that make it unique to my class. Back in View1 I get the stuff that makes the Entity2 unique and use that as a filter so CoreData can get the same Entity2 that View2 already had. Now I can associate the Entity2 I just got with my Entity1. This seems like more work and a lot of places where bugs can creep in.