|
From: Scott C. <sco...@mi...> - 2003-10-02 17:43:40
|
In SQLObject.html, it shows the following:
p = Person.new(firstName="John", lastName="Doe")
#>> QueryIns:
# INSERT INTO person (last_name, middle_initial, first_name)
# VALUES ('Doe', NULL, 'John')
#
#-- Not quite optimized, we don't remember the values we used to
#-- create the object, so they get re-fetched from the database:
#>> QueryOne:
# SELECT last_name, middle_initial, first_name
# FROM person
# WHERE id = 1
Where does it learn that the new Person has an ID of 1?
I tried the same commands manually and the insert doesn't return the ID. How
does SQLObject know what the ID is?
Confsued,
Scott
|