It's definitely better to add warning suppression with a comment for why than add broken serial version id.

At least for the case of entities (so should do an updated hibernate tools release or extend the used default template). 

Pete, got example what you put as comment in the past?

/max (sent from my phone)

On 29/05/2013, at 18.16, "Lincoln Baxter, III" <> wrote:

Is this something that you think we should be doing by default?

On Wed, May 29, 2013 at 12:14 PM, Pete Muir <> wrote:
Adding forge-dev

The approach we took in the quickstarts was to add @SuppressWarnings("serial") in this case, as it adds a visual warning to the class that you haven't taken this step, without the annoying warning in the IDE. We also try to add a comment to the effect you need to do this before you go into production.

On 23 May 2013, at 23:44, Max Andersen <> wrote:

> On Thu, May 23, 2013 at 03:40:42PM -0400, Burr Sutter wrote:
>> Lots of warnings when Forge generates a JPA entity
>> "The serializable class Actor does not declare a static final serialVersionUID field of type long"
> we can disable the warninng in JBDS I believe.
> It is eclipse being anal - they are correct in that you should add such field, but if you do then
> you are declaring you are guaranteeing serializability between versions of your class which generated code
> cannot guarantee nor does any user need this.
> I've written about it in blogs and wikis - I can digg them out if you want the glory details :)
> /max

forge-dev mailing list

Lincoln Baxter, III
"Simpler is better."
forge-dev mailing list