Sisäänkirjautuminen| Uusi tunnus
FrontPage| Projects| Forums| Search|
^ DaoGen Forums: › Why? › PHP5? › Using ToString() with PHP › Next DaoGen version almost ready! › Create (insert) and Save (update) PHP examples › Support for numeric object types almost ready! › DaoGen 2.1.0 released! › Compliments and minor suggestion › variables within a class › Foreign key constraint in create() › Security issue!!! » auto-generated columns and create method › Oracle BLOB › DAO for cross-table queries › Please help me.. › Please use this forum for DaoGen related stuff › Call-time Pass-By-Reference › DaoGen 2.4.0 has been released! › How can I show relationships? › DaoGen & PHP 5 › PHP4 vs PHP5 and other considerations. › singleQuery example in php › Why are save and delete not synchronized? › Why are save and delete not synchronized? › DTD for generated XML › DaoGen 2.2.2 has been released! › DaoGen 2.0.2 is available. › For a thesis ?? › Extremely good idea ?? how can I ???? › Usability suggestions for DaoGen › Performance of DaoGen with Mapping tools › Performance with List › Some usage statistics › DaoGen 2.2.1 has been released! › Programming Examples are back! › DaoGen 2.0.1 is available. › Version 2.0.0 generates buggy PHP code! New version soon available! › Examples of DaoGen customizations › Code Examples
» Käyttäjätunnus:
» Salasana:
» Muista kirjautuminen:
Suosituimmat sivut: › DaoGen Forums › Using ToString() with PHP › PHP4 vs PHP5 and other considerations. › Programming Examples › Projects › Search › DaoGen FAQ › DaoGen Manual › Forums › How can I show relationships?
FrontPage » Forums » DaoGen Forums » auto-generated columns and create method

auto-generated columns and create method

Posted by anonymous 06.01.2006 23:06

The doc for the method "public synchronized void create" says:
Also, if this table does not use automatic
* surrogate-keys the primary-key must be specified. After INSERT command this
* method will read the generated primary-key back to valueObject if automatic
* surrogate-keys were used.

How to I enable support for auto-generated primary keys. Should I manually delete the auto-generated column from the create method?

Re: auto-generated columns and create method

Posted by Luigi 10.01.2006 22:43


The comment on create() method is a static string in DaoGen generator, which means it will not change when you change generator options. This is unfortunately true for all comments. Because of this restriction the wording on comments is sometimes not so clear.

In this case, the automatically generated keys-option which the comment refers, is found from the same page that asks the column names. Maybe you have not seen it, since the way different databases do the automatic value generation is different in each database and you will have to select a spesific database server in the first screen to have this option at all.

Just try to select MySQL in the first screen and then see check the option in the second page and proceed to generate code. It is more clear once you see the code and the corresponding create table command.

// Luigi