Re: Adding a custom type for Joda Time DateTime

2011-10-04 Thread Marc O'Morain
ed in my app for some reason, and I just > > return true. > > Yep, that's all you need to do. ExtendedType.validateProperty is deprecated > in 3.0 and is removed in 3.1 > > Cheers, > Andrus > > > On Aug 9, 2011, at 1:55 AM, Marc O'Morain wrote: > > Hi

Re: Size of Object Cache in Modeller has no effect

2011-09-06 Thread Marc O'Morain
Aha, it's a UI issue - it seems you need to click around into other UI elements to make sure that the Modeller thinks that the value is dirty, before saving. On Tue, Sep 6, 2011 at 11:12 AM, Marc O'Morain wrote: > Hi there, > > When I change the value of "Size of Object

Size of Object Cache in Modeller has no effect

2011-09-06 Thread Marc O'Morain
Hi there, When I change the value of "Size of Object Cache" in my project in the Modeller, there is no effect in the generated cayenne.xml. (Or any file under git (cayenne.xml, and the map and node xml files). I assume it's meant to change something? Is this is known issue? Thanks, Marc

Re: How do I do a relationship on non-PKs in Modeler?

2011-09-04 Thread Marc O'Morain
Hi Jo, I was able to do this in the past by editing the .map.xml file by hand to add the relationships. To do this I added a foreign key on the database for one table temporarily, and let Cayenne infer this relationship. This produced the relationship that I needed. I was then able to delete the f

Adding a custom type for Joda Time DateTime

2011-08-08 Thread Marc O'Morain
Hi all, I have just created a custom ExtendedType to allow Cayenne to load/save DateTime object created with the Joda Time API. I find the Joda Time solves many problems that I have with Java's built-in Date and Calendar classes, so I have just moved our codebase over to use Joda Time. The file i

Re: How to batch INSERT .. ON DUPLICATE operations

2011-07-13 Thread Marc O'Morain
That worked great. Thanks for the help. On Wednesday, July 13, 2011, Marc O'Morain wrote: > HiĀ Andrus, > > Thanks for the quick reply. I'm going to read those docs, and give your > suggestion a go. I'll let you know how I get on. > Marc > On Wed, Jul 13,

Re: How to batch INSERT .. ON DUPLICATE operations

2011-07-13 Thread Marc O'Morain
commit(); > } > catch (Exception ex) { >tx.setRollbackOnly(); > } > finally { >Transaction.bindThreadTransaction(null); > >if (tx.getStatus() == Transaction.STATUS_MARKED_ROLLEDBACK) { >try { > tx.rollback(); >} >catch (Except

How to batch INSERT .. ON DUPLICATE operations

2011-07-13 Thread Marc O'Morain
Hi there, I have an application that needs to perform a lot (~4000) of "INSERT .. ON DUPLICATE ..." operations to a MySQL databases. My Java code looks like this: long id = ; long time = ; DataContext dataContext = .; dataContext.performNonSelectingQuery(new SQLTemplate(LiveEvent.cla