public boolean delete() {
		Table table = _getTable();
		String[] pKeys = table.getPrimaryKey();
		if (pKeys.length == 1) {	// 优化：主键大概率只有一个
			Object id = attrs.get(pKeys[0]);
			if (id == null)
				throw new ActiveRecordException("Primary key " + pKeys[0] + " can not be null");
			return deleteById(table, id);
		}
		
		Object[] ids = new Object[pKeys.length];
		for (int i=0; i<pKeys.length; i++) {
			ids[i] = attrs.get(pKeys[i]);
			if (ids[i] == null)
				throw new ActiveRecordException("Primary key " + pKeys[i] + " can not be null");
		}
		return deleteById(table, ids);
	}
public boolean delete ( ) { Table table = _getTable ( ) ; String [ ] pKeys = table . getPrimaryKey ( ) ; if ( pKeys . length == 1 ) { Object id = attrs . get ( pKeys [ 0 ] ) ; if ( id == null ) throw new ActiveRecordException ( "Primary key " + pKeys [ 0 ] + " can not be null" ) ; return deleteById ( table , id ) ; } Object [ ] ids = new Object [ pKeys . length ] ; for ( int i = 0 ; i < pKeys . length ; i ++ ) { ids [ i ] = attrs . get ( pKeys [ i ] ) ; if ( ids [ i ] == null ) throw new ActiveRecordException ( "Primary key " + pKeys [ i ] + " can not be null" ) ; } return deleteById ( table , ids ) ; }
Delete model.