Greetings, My name is Stevan Buzejić, a master student of software engineering at the Faculty of organizational sciences in Belgrade, Serbia. I am working on a research project that involves Your framework, NakedObjects or ApacheIsis(for the Java platform). I have learned the basic concepts of NakedObjects, made a few simple use cases and have decided to try something a bit more complex. Namely, I have a strong object and a weak object and what I would like to do, is make a more complex form for the strong object (in my concrete case, the strong object is named Customer) that allows us to immediately add weak objects to it (in my case, weak objects are Invoices). Specifically, what I would like is to be able to add weak objects to a temporary list and after clicking the Save button for the strong object, I would like to save everything to the database with all the relationships correctly created and transferred.
I have managed to create Customer and Invoice classes and all relationships between them (Using mutual registration patern). But then the problem arises. I am using dnd viewer. When Ii press right click on a Customer and select new Customer option I want to add to that cutomer an Invoice. So I press right click on mouse and select new Invoice (similar use case like CarService application example from the book Domain driven design using Naked Objects, when I want to add a car to a customer). After that I fill the form for creating new Invoice with some data and press save button. Everithing it's ok. But now I want to save my Customer. When I press the save button on a Customer form exception arises: org.apache.isis.runtimes.dflt.runtime.persistence.NotPersistableException: Object already persistent: PojoAdapter@1be032b[PR~~:OID#5+,specification=Customer,version=1,pojo-toStri ng=dom.masterapp.Customer$$EnhancerByCGLIB$$131323de@68cb669d,pojo-hash=#68c b669d] etc. I know why it is happening, the Customer is saved when I save the Invoice, so when I hit save on Cusotmer form it tries to save it again but this customer is already persisted. Is there any techique to avoid this problem or any example on web where I can find solution for this? I know how to achieve this using conventional programming and various technologies, but I am not sure if and how it can be done with Your framework. Currently I am reading Your book "Domain driven design using Naked Objects", and I haven't managed to find the resources needed to solve my problem and are hoping You can help me with tips and/or instructions. I thank You in advance for any help You can give me it would be significant to my work. Stevan Buzejic +38163628238
