deleting a record and validation

2007-03-19 Thread Marcin Skladaniec
Hi I use remote persistence, and I have a dozen objects in the context, and I would like to try to check if one of them can be deleted. Can I just call recordToBeDeleted.validateForDelete() before I call context.deleteRecord( recordToBeDeleted ) ? From my understanding context.deleteRecord wi

Re: problems querying int,long

2007-03-19 Thread Frank
Hi Michael , Here is more of my code: I did not understand your statement Thanks Frank public class Schedules extends _Schedules { public int getSchedule_id() { return DataObjectUtils.intPKForObject(this); } private String getProvider(long pid) { .. if (records.size() > -1) { Schedules s =

Re: problems querying int,long

2007-03-19 Thread Michael Gentry
Try using a java.lang.Long or even a java.math.BigInteger. If you use the BigInteger, use String.valueOf(yourLong) to pass into the constructor (BigInteger() will take a String, but not a long). /dev/mrg On 3/19/07, Frank <[EMAIL PROTECTED]> wrote: Hello, I am getting hung up on passing int

problems querying int,long

2007-03-19 Thread Frank
Hello, I am getting hung up on passing int and long values to cayenne. In my MySQL database, all PK fields are defined as BIGINT. The PK in my cayenne schemas are defined as long. ExpressionFactory.matchDbExp is looking for an object, I am passing in a long. What is the best way to handle this?

Re: Non persistent attributes

2007-03-19 Thread Andrus Adamchik
BTW, JPA spec defines a concept of a "transient" attribute, so this will be coming to Cayenne as well. Although as others noticed this is primarily a non-functional (although useful) convenience. Andrus On Mar 18, 2007, at 2:33 PM, Juergen Saar wrote: The actual way for cayenne is the defi