Re: EO/Java class default Values

2006-10-04 Thread Tom M. Blenko
On Sep 27, 2006, at 1:49 PM, Zak Burke wrote: Tarun Reddy wrote on 9/27/06 4:18 PM: I assume that awakeFromInsertion (based on the name) does not execute until the actual insertion of the object in the database, which means I can't rely on the value until the object has been saved. I am

Re: EO/Java class default Values

2006-10-04 Thread shaun
Hi, I've just caught the tail end of this thread so I apologise in advance if I am repeating something already mentioned. Tom M. Blenko wrote: On Sep 27, 2006, at 1:49 PM, Zak Burke wrote: Tarun Reddy wrote on 9/27/06 4:18 PM: I assume that awakeFromInsertion (based on the name) does

Re: EO/Java class default Values

2006-09-27 Thread Markus Ruggiero
On 27.09.2006, at 06:40, Tarun Reddy wrote:Sorry if this is dirt simply but I seem to be missing something that every google search, as well as page 170 in Joshua Marker's book suggest should work.I have a small app where there is an WOHyperlink called "Submit new idea" that calls a method that

Re: EO/Java class default Values

2006-09-27 Thread Ken Anderson
Exactly.  You should always set default values through the implementation of awakeFromInsertion(), like this:public void awakeFromInsertion(EOEditingContext ec) { super.awakeFromInsertion(ec); this.setSomething(aValue);}KenOn Sep 27, 2006, at 3:07 AM, Markus Ruggiero wrote:I can only think that

Re: EO/Java class default Values

2006-09-27 Thread David LeBer
On 27-Sep-06, at 6:39 AM, Ken Anderson wrote: Exactly. You should always set default values through the implementation of awakeFromInsertion(), like this: public void awakeFromInsertion(EOEditingContext ec) { super.awakeFromInsertion(ec); this.setSomething(aValue); } Ken

Re: EO/Java class default Values

2006-09-27 Thread Tarun Reddy
Hmm... I guess I knew that. I switched to using createAndInsertInstance everywhere for that reason. I didn't see far enough that behind the scenes it is doing a new Idea() and then adding it to the context. Of course by the time it does the insert, the value is set in the constructor. I assume

Re: EO/Java class default Values

2006-09-27 Thread David LeBer
On 27-Sep-06, at 4:18 PM, Tarun Reddy wrote: I assume that awakeFromInsertion (based on the name) does not execute until the actual insertion of the object in the database, which means I can't rely on the value until the object has been saved. I am currently using the method to store

Re: EO/Java class default Values

2006-09-27 Thread Zak Burke
Tarun Reddy wrote on 9/27/06 4:18 PM: I assume that awakeFromInsertion (based on the name) does not execute until the actual insertion of the object in the database, which means I can't rely on the value until the object has been saved. I am currently using the method to store creation date

Re: EO/Java class default Values

2006-09-27 Thread Tarun Reddy
On Wed, 2006-09-27 at 16:27 -0400, David LeBer wrote: On 27-Sep-06, at 4:18 PM, Tarun Reddy wrote: I assume that awakeFromInsertion (based on the name) does not execute until the actual insertion of the object in the database, which means I can't rely on the value until the object has

Re: EO/Java class default Values

2006-09-27 Thread Chuck Hill
On Sep 27, 2006, at 1:49 PM, Zak Burke wrote: Tarun Reddy wrote on 9/27/06 4:18 PM: I assume that awakeFromInsertion (based on the name) does not execute until the actual insertion of the object in the database, which means I can't rely on the value until the object has been saved. I am

EO/Java class default Values

2006-09-26 Thread Tarun Reddy
Sorry if this is dirt simply but I seem to be missing something that every google search, as well as page 170 in Joshua Marker's book suggest should work.I have a small app where there is an WOHyperlink called "Submit new idea" that calls a method that creates a new "Idea" object and the returns a