This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 243054 - Default entity table name when annotation @Table is on superclass
Summary: Default entity table name when annotation @Table is on superclass
Status: RESOLVED FIXED
Alias: None
Product: javaee
Classification: Unclassified
Component: Persistence (show other bugs)
Version: 7.4
Hardware: PC Linux
: P3 normal (vote)
Assignee: Sergey Petrov
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-03-19 12:51 UTC by soldierkam
Modified: 2014-07-26 01:24 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description soldierkam 2014-03-19 12:51:42 UTC
Netbeans is reporting that User entity table name is "user" (it is reserverd sql keyword), but does not check superclass annotations. On superclass we defined table name as 'users'.

@Entity
@DiscriminatorValue("USER")
public class User extends AbstractUser {
...
}

@Entity
@Table(name = "users")
public abstract class AbstractUser implements Serializable{
...
}
Comment 1 Sergey Petrov 2014-07-22 15:59:34 UTC
http://hg.netbeans.org/web-main/rev/0a601710da80 use parent classes to find @Table
Comment 2 Quality Engineering 2014-07-23 02:08:30 UTC
Integrated into 'main-silver', will be available in build *201407230001* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)

Changeset: http://hg.netbeans.org/main-silver/rev/0a601710da80
User: Sergey B. Petrov <sj-nb@netbeans.org>
Log: #243054 check parents for table annotation
Comment 3 Quality Engineering 2014-07-26 01:24:11 UTC
Integrated into 'main-silver', will be available in build *201407260001* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)

Changeset: http://hg.netbeans.org/main-silver/rev/d742de8df2e6
User: Sergey B. Petrov <sj-nb@netbeans.org>
Log: #243054 addl fix