Hi Ramiro, Finally I have something specific for you: https://issues.apache.org/jira/browse/CAY-1743
In the source code attached to this Jira, I am simply blocking "readOnly" status of all model relationships. The example is a completely self-conatined project. It is built against 3.2M1-SNAPSHOT (SVN trunk), but it should work with 3.1B1 as well. And for 3.0.x, you can simply "inline" the fancy DI module code in "cayennehacks"… Take a look at Main.java and cayennehacks package. The "hacks" is what it takes now to make vertical inheritance relationships work. > If I try to creat a entity relationship on User I must set the target to > Session entity and not WebSession, if I set it to WebSession tells me there > is no mapping and if I choose the correct mapping to WebSession then as there > is no entity linked to that table it complains about no target entity. This part worked for me on 3.1B1 Modeler. Andrus On Oct 5, 2012, at 5:28 PM, Ramiro Aparicio <[email protected]> wrote: > El 19/09/2012 22:12, Andrus Adamchik escribió: >> On Sep 19, 2012, at 11:24 AM, Ramiro Aparicio <[email protected]> >> wrote: >> >>> BTW I tried to do everything with 3.0.2 modeller and finally updated to >>> 3.1.B1 modeller, Will the model created with 3.1.B1 modeller work with >>> 3.0.2 runtime? (I want to update the runtime but just in case I can not do >>> it). >> No, once you upgrade the Model to 3.1, there's no (automated) way to go back >> to 3.0. The project structure is different in 3.1. The biggest change is >> that the new projects have at most 1 domain per project. It is probably >> doable by manually editing XML, but there's little point in that. After all >> the only reason to use the new Modeler is if you are planning to use the new >> runtime. >> >> I'll try to find time to get to the rest of your message. I rarely if ever >> use vertical inheritance, but I may try out your scenario. >> >> Andrus >> > > Hi again, > Ok after the big refactoring I am now able to test this and I get this > exception on commit: > "Cannot set the read-only flattened relationship 'toUser' in ObjEntity > 'SessionLogWeb'." > or > "Cannot set the read-only flattened relationship 'runtimeRelationship1' in > ObjEntity 'SessionLog'." > depending on which side I try to use when setting the relationship. > (SessionLogWeb is WebSession on my previous example and SessionLog is Session) > > So even if only one side of the relationship is marked as read only it is not > possible to set the relationship from either side, as this kind of mapping is > a bit unexplored using cayenne I will happily try any different options but I > would like to mantain the vertical inheritance as this is a logging table > that will hold millions of records so using a shared table will waste too > much space. > > Thanks in advance. > > Ramiro Aparicio >
