---
title: "新增记录后能得到自增ID"
author: "yinter"
date: "2008-01-18T16:03:04Z"
tags: []
slug: "id"
draft: false
lastmod: "2008-01-18T16:03:04Z"
id: 157345
url: "https://yinter.iteye.com/blog/157345"
---

今天使用javaeye有点慢，不知道是不是服务器！


在开发过程中要得到新增记录的自增ID，用Model.new不是行的，只能用Model.create；搞了半天终于找到了他们的区别！
大家还可以看看new！，create！