Donate Share

Ammentos Persistence Layer

Code

Programming Languages: Java

License: Apache License V2.0

Repositories

browse code, statistics, last commit on 2009-09-10 cvs -d:pserver:anonymous@ammentos.cvs.sourceforge.net:/cvsroot/ammentos login

cvs -z3 -d:pserver:anonymous@ammentos.cvs.sourceforge.net:/cvsroot/ammentos co -P modulename

Show:

What's happening?

  • Followup: RE: When to update and insert, is save correct?

    Hi Davide, I do have an annotation with automatic=true. But i would expect it to only work if i did not provide a primary-key myself, i.e. when the primary-key is 0 or null or something. If i provide a key for a record which needs to be updated it should obviously leave it alone. Is that is what is going wrong? If so, is it by design to always overwrite a supplied key instead of filling it...

    2009-10-27 16:48:12 UTC by jdv145

  • Followup: RE: When to update and insert, is save correct?

    Hi Jan. It's not normal that Ammentos is generating new primary keys for saved objects if there is no explicit annotation automatic=true above the primary key field. The save() mechanism has been working fine for several years... could you paste the piece of code you're working on? You said you are making copies of persistent objects: this could actually cause insert stataments, but...

    2009-10-27 11:47:54 UTC by ddpole

  • Followup: RE: When to update and insert, is save correct?

    Hi Davide, I am already using override, but looking at override... it is using save. I understand your assumption about objects not loaded from the database need to be inserted, but the assumption is not always correct. Anyway, i used a debugger and somehow if i want to update an old record somewhere during the process it gets a new autogenerated primary key (why?!) and then it is...

    2009-10-27 11:01:12 UTC by jdv145

  • Followup: RE: When to update and insert, is save correct?

    Hi jdv145 Ammentos' save() mechanism is based on the assumption that any new object (not loaded from the database) must be inserted to become persistent. If you need to force updating an already existent object without firstly loading it, take a look at Ammentos.override() method. Regards Davide.

    2009-10-27 07:36:08 UTC by ddpole

  • When to update and insert, is save correct?

    I looked into the sourcecode and i noticed the following in the save function in DatabasePersistor.java. if (!isLoaded(c, obj)) { insert(c, obj, conn); } else { update(c, obj, conn); } If i understand it correctly, an object is inserted when it is not loaded before. I think this is not always reliable for 1 and maybe 2 reasons. 1) If the...

    2009-10-25 16:42:44 UTC by jdv145

  • Ammentos 2.0 Beta 1 just released

    We are proud to present the first Ammentos Persistence Framework release by Calameda. A lot of work has been done behind the scenes in the last months to improve the framework in many sides. The updated user guide is already available at www.ammentos.org/userguide_2.0.htm. Ammentos 2.0.b1 is available for download at sourceforge: http://sourceforge.net/projects/ammentos/files/.

    2009-10-08 07:11:06 UTC by ddpole

  • Ammentos Persistence Layer

    ddpole made 3 file-release changes.

    2009-10-07 20:52:02 UTC by ddpole

  • Ammentos Persistence Layer

    ddpole changed the public information on the Ammentos Persistence Layer project.

    2009-10-03 12:51:27 UTC by ddpole

  • Ammentos Persistence Layer

    ddpole changed the public information on the Ammentos Persistence Layer project.

    2009-10-03 12:46:30 UTC by ddpole

  • Ammentos Persistence Layer

    ddpole changed the public information on the Ammentos Persistence Layer project.

    2009-10-03 12:42:43 UTC by ddpole

Our Numbers