ibatis-user-java mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Michael He <hyxw5...@yahoo.com.cn>
Subject Can't delete without the setter method
Date Wed, 03 Dec 2008 14:56:40 GMT


if i don't set the setter method of the keyword-column property in a
javabean,then i can't delete it using this property?
 
for example:

the javabean:
public class JobPosting implements Serializable {
	private int jobPostingId;
	//missing other properties...
            ...
	public int getJobPostingId() {
		return jobPostingId;
	}//only the getter method
             //missing other getter/setter methods
             ...
}

the xml:
<delete id="deleteJobPosting" parameterClass="JobPosting">
	   delete from jobPosting where jobPostingId=#jobPostingId#
</delete>

the java code:
public void deleteJobPosting(JobPosting j) {
		getSqlMapClientTemplate().delete("deleteJobPosting", j);
	}

i have tested it can't be deleted in this case,there is also no error
messages,but i can  insert with the same model, anyone knows why?

thanks in advance
-- 
View this message in context: http://www.nabble.com/Can%27t-delete-without-the-setter-method-tp20814477p20814477.html
Sent from the iBATIS - User - Java mailing list archive at Nabble.com.


Mime
View raw message