Entity « netbeans « Java Enterprise Q&A





1. Creating a MySQL table and Entity from Database.    forums.netbeans.org

ceyezumma Joined: 02 Feb 2009 Posts: 121 Posted: Sat Mar 21, 2009 4:57 am Post subject: Creating a MySQL table and Entity from Database. Topic The topic of ...

2. help with Entities and Netbeans    forums.netbeans.org

hi, i am new to ejb.i an reading "ejb 3 dev guide", and i use netbeans 6.5 to practice. but i have not been able to practice the "chapters on entities" ...

3. Single entity persisted in different data sources    forums.netbeans.org

Posted: Tue May 12, 2009 12:59 pm Post subject: Single entity persisted in different data sources Dear members, I am struck in a problem of persisting a single ...

4. Netbeans Wizard thinks I'm using < 1.5 jdk when creating entity class    forums.netbeans.org

I'm on Mac OS X 10.5.7, NB 6.7, JDK 1.6 EE, with Maven. When I try to create a Persistence, Entity class, in the second screeen I get this error msg ...

5. Using calculated properties of an entity - basic persitence design question    forums.netbeans.org

qkrijger Joined: 27 Jul 2009 Posts: 9 Posted: Thu Jul 30, 2009 11:02 am Post subject: Using calculated properties of an entity - basic persitence design question Hi ...

6. Bug in "New entity classes from database"    forums.netbeans.org

Hello, when using the wizard "new entity classes from database" it seems that there is a bug when the Data Source has a broken view. Accessing the database directly, the view ...

7. Workaround needed: New Entity Class from Database cannot be created when a table does not have a primary key...    forums.netbeans.org

Hello everyone, first of all - the nb db reverse engineering mechanism 'Entity Classes from Database' is really really great. I encountered a huge problem: our legacy db has a lot ...

8. problem with entity classes    forums.netbeans.org

Hi all, I have a problem with the entity classes in my ejb project. My situation : I have database with some tables. So I've created entity classes using netbeans wizard. ...

9. NB 6.8 beta - can't generate entity classes from MySQL    forums.netbeans.org

Hello all, I'm trying to generate entity classes from MySQL tables with NetBeans wizard. Currently I use 6.8 beta. Datasources and connection pools are configured on Glassfish v3. Domain In the ...





10. Entity Classes from Databases retrieves no tables    forums.netbeans.org

I have a very simple case here. Everything is being developed locally. I created a new mySQL database and in it a new schema called rideshare. In this schema are two ...

11. MarshalException when getting entity classes outside Netbeans environment    forums.netbeans.org

Hi all, I'm developing an enterprise application in Netbeans 6.7.1, Glassfish v2.1 with swing client, EJB3, JPA and MySQL database. At this time it's running on Windows XP (tried on Windows ...

12. How to retrieve detached @ManyToOne entities with Fetch Join relationship    forums.netbeans.org

View previous topic :: View next topic Author Message Jack Bush Posted via mailing list. Posted: Fri Sep 12, 2008 12:58 pm Post subject: How to ...

13. Generating the Entity Classes from the Database doesn't seem to work    forums.netbeans.org

Hi there, Generating entity classes in the tutorial Generating a JavaServer Faces 2.0 CRUD Application from a Database doesn' t seem to work. It generates the classes in the jpa.entities package, ...

14. Creating Entity Classes from MS-SQL server database    forums.netbeans.org

Is there a quicker way to create the entity classes (from database) using SQL server without having to retrieve every table in the database? it takes all day, I would think ...

15. Example of entity calling functions or procs?    forums.netbeans.org

What is the proper way to call a function or stored procedure with JPA 2.0 and EJB3.1 in an entity class? I couldn't find annotations for this... I do note that ...

16. problem merging detached entity    forums.netbeans.org

NetBeans Forums FAQ Search Memberlist Register Profile Log in to check your private messages Log in





17. Problem generating entity classes from MSSQL - NB 6.8 bug    forums.netbeans.org

Hello, I'm creating a RESTful web service and I need to begin using database tables I have in MS SQL Server 2005. I have a datasource set up in NB as ...

18. Generate Entity Classes from Database BigDecimal issue    forums.netbeans.org

Hi, I am creating some Entity Classes from an Oracle database using netbeans. I have generated the classes and find that all my database columns of type Number in oracle are ...

19. "not a known entity type" error after redeployment    forums.netbeans.org

Hi, I'm working on a JPA web application. Every time I make a modification, NB6.8 redeploy my project, and then my application happens to "not a known entity type" errors. I ...

20. New Entity Classes from Database - hangs    forums.netbeans.org

I'm trying to create entity classes from our Oracle DB, but Netbeans hangs while reading the schema. The schema is quite large. NB hangs after reading 1%. See attached JPEG. BTW, ...

21. problem with the JAX-RS entities from database    forums.netbeans.org

duckconfit Joined: 22 Dec 2009 Posts: 3 Posted: Mon Apr 05, 2010 6:40 pm Post subject: problem with the JAX-RS entities from database I had tables in MySQL ...

22. problem with the JAX-RS entities from database    forums.netbeans.org

duckconfit Joined: 22 Dec 2009 Posts: 3 Posted: Mon Apr 05, 2010 6:41 pm Post subject: problem with the JAX-RS entities from database I had tables in MySQL ...

23. EntityManager persist does not return generated id at inherited entity    forums.netbeans.org

// PARENT ENTITY @Entity @Inheritance(strategy=InheritanceType.JOINED) @DiscriminatorColumn(name="account_type", discriminatorType=DiscriminatorType.STRING) @SequenceGenerator(name = "user_acc_seq", sequenceName="user_account_user_id_seq", allocationSize=1) @Table(name = "user_account") @NamedQueries(...) public abstract class UserAccount implements Serializable { private static final long ...

24. Need help with entity bean and web service    forums.netbeans.org

Hi, I'm new to java and working on the simple application which requires me to consume a web service and display its content using JSP page. I did some experiments using ...

25. NB 6.9: Entity classes from database generation    forums.netbeans.org

Hi, I use this feature since a lot of time, now upgrade to Netbeans 6.9. Recently I needed to update my entity classes because of a database structure change, then I ...

26. clever entity updates    forums.netbeans.org

I have an application which is obtaining data from external XML source (Oracle AQ). Everything seems to be fine when it gets completely new data, but when the message contains existent ...

27. Entity class from database generation    forums.netbeans.org

drewh Joined: 18 Nov 2009 Posts: 12 Posted: Wed Jul 14, 2010 8:27 pm Post subject: Entity class from database generation Hey guys I've been loving this feature ...

28. Generated entities from database    forums.netbeans.org

Hi, I have in my database a many-to-many table that also has columns for storing data (not just the primary keys of their parent tables). When the entity class of this ...

29. Entity Classes From Database    forums.netbeans.org

Hi! Anybody knows how can I edit the templates "Entity Classes From Database"? I think the packages are: org.netbeans.modules.j2ee.persistence.wizard.fromdb But I didn't find the source. Best Regards, Andr

30. javax.el.PropertyNotFoundException: The class 'entity.Category' does not have the property 'id'    forums.netbeans.org

I'm working on the new Netbeans Ecommerce Tutorial in the Java EE & Java Web Learning Trail[http://netbeans.org/kb/docs/javaee/ecommerce/entity-session.html]. Eveything worked as detailed in the tutorial till the step "Adding Entity Classes and Session Beans", then when I add Entity classes to the project , I am getting the following error when i try to run the project: ATTENTION: StandardWrapperValve[jsp]: PWC1406: Servlet.service() for ...

31. How to retrieve a List<> with all the entities in a database table    forums.netbeans.org

Hi, This is my code, public JerseyClient() { com.sun.jersey.api.client.config.ClientConfig config = new com.sun.jersey.api.client.config.DefaultClientConfig(); client = Client.create(config); webResource = client.resource(BASE_URI).path("pruebas"); } this is the constructor of the client. And I get the list of entities as follows, public List getPruebas() { List pruebas = new ArrayList(); // 2, get response and headers etc, wrapped in ClientResponse GenericType> genericType = new GenericType>() {}; ...

32. Problems with creating Entity Classes from Database    forums.netbeans.org

Hello, I'm having trouble creating Entity Classes in the Entity Classes from a Database Wizard. Every time I try to create a new data source from my Database literally nothing happens. All fields stay empty and a new data source is also not created. I have done everything like the Tutorial "Generating a JavaServer Faces 2.0 CRUD Application from a Database" ...

33. problems in creating new cmp entity bean from database    forums.netbeans.org

when I do new CMP bean from database at step 2, it asks me for data source, I select TestDB, which is a network derby server. Then netbeans will pop up the "new database connection" window with all the fields of TestDB filled out, I click ok, then it asks for to "select schema" and I select "app" and click ok, ...

34. updating entity bean    forums.netbeans.org

Its the best you'll get .. the huge variety of 'what if's ' that any other possible solution would generate would make it impossible for the developers to work out ... "oh hang on did the guy really mean to make that change? Do we automatically rebuild the entity class now, or is he going to make another change in a ...

35. "Entity classes from database" and Many-To-Many tables    forums.netbeans.org

Hi! I have a app with three tables, ROLES, USERS and ROLES_OF_USERS (the last one is a MANY-TO-MANY relashionship between ROLES and USERS. My question: Why does NetBeans, by using "entity classes from database", generates only entities for the two first tables and for ROLES_OF_USERS it doesn't? (in the Wizard that table is shown as "join table"). Best regards! Andr

36. Entity class generation issue for BLOB fields NB 6.9.1    forums.netbeans.org

I have found that the "New entity classes from database" routine in NB 6.9.1 creates "Serializable" field types for BLOB fields I have in a Derby database. Previously in NB 6.8 it had the field type of byte[], which I think is correct. I manually changed the generated type, recompiled and my program works fine. I am still tweaking the database ...

37. Entity beans    forums.netbeans.org

Hey guys, I was working on entity bean in which I done with making session beans class,entity bean class,interface and jsp page, I just want to save my values(enter in textboxes by jsp) in database(derby) ,but there is some problem in showing values in DB,but at the same tym table is created by using CMP beans(in which tables created automatically). please ...

38. Cascading Primary Key value to an entity with a composite Primary Key    forums.netbeans.org

My use case is a little more complex (although methinks it is a very common case) so bear with my explanation. Here is the lay of the land. I have two three entities - Product, UserList, ListContent. The structure of the entities and then at the bottom I have explained what is happening. Product @Entity @Table(name="products") ----------------- @Id @Basic(optional = false) ...

40. Incomplete Persistence of Entity    forums.netbeans.org

View previous topic :: View next topic Author Message grenadadoc Joined: 15 Apr 2010 Posts: 4 Posted: Tue Nov 30, 2010 7:37 pm Post subject: Incomplete Persistence of Entity I'm using Primefaces 2.2 RC2 (21 Nov 2010) to display a large dataTable w/ lazy loading and pagination. There is a p:cellEditor tag that refers to a ...

41. Entity with foreign key problem    forums.netbeans.org

Hi, I just tried the functionality 'Entityclasses from Database' in conjunction with 'JSFClasses from Entityclasses'. I'm wondering, if the generated code doesn't support foreign keys. I'm using Netbeans 7 Beta. I have the tables room and dimension with dimension connected to room 1:1, OnetoOne. When I try to create a dimension with the created /dimension/Create.xhtml the code doesn't set the selected ...

42. Entities from database wizard not recognizing primary keys    forums.netbeans.org

Here's a more specific example. NB says the first table does not have a primary key, but the second one does. Note that the first table has a foreign key linking to the second. Where is the error? Eric CREATE TABLE `tblaxis1` ( `Axis1ID` mediumint(9) NOT NULL, `JHID` mediumint(9) NOT NULL, `EntryDate` datetime DEFAULT NULL, `DSMCodeID` mediumint(9) DEFAULT NULL, `DisentryDate` datetime ...

43. Generating entity classes from database - question    forums.netbeans.org

I have a question about entity beans. Suppose I have two tables that have a one-to-many relationship. Let's say, Table A is on the "one" side and Table B is on the "many" side. If I use the NB "Entities from database" wizard, I seem to only get a bean generated for Table A. Table B does not result in an ...

45. Does deleting an entity from a relationship collection propogate to the underlying database?    forums.netbeans.org

Ive never tried this, so ... Assume I have Class Person, which has a OneToMany relationship with Class TelephoneNumber (asfter all, many people nowadays have more than one contact number!). I retrieve an Person entity from the database via a persistence context. I instantiate the TelephoneNumber collection referenced by the Person entity (remembering that its lazily instatiated so I have to ...

46. Re: Does deleting an entity from a relationship collection propogate to the underlying database?    forums.netbeans.org

OK, not tested this yet, but using JPA 2.0 the answer appears to be true. After posting the OP, I found a wikibooks article telling me that if I include ophanRemoval=true in the entity annotations for the OneToMany relationship then it does what I asked. http://en.wikibooks.org/wiki/Java_Persistence/Relationships#Orphan_Removal_.28JPA_2.0.29 Has anyone used this method? Any gotchas I need to look out for? Tony From: ...

47. Entity Bean Error    forums.netbeans.org

Hello to all, i have created a simple web application with ejb module bundled together with the web module which followed from this tutorial. http://netbeans.org/kb/docs/javaee/javaee-gettingstarted.html#Exercise_1 However, i get this error message freemarker.core.ParseException : Found unexpected directive on line 7, column1 check whether you have a well formed if else block when i try to create a entity class. AFAIK, this ...

48. Entity classes from Database: Detect Relation Direction from Schema.    forums.netbeans.org

What are you using as your foreign keys? And where are you specifying them? Which direction do they go? If you specify both relationships in the View ExamQuestion, then you get the result you have currently. Do you need the relationship between the Exam table specified in the ExamQuestion table or in the Exam table? If you specify the relationships as ...

49. calling Stored Procedure from Entity bean    forums.netbeans.org

Hi I am developing web based application. I want to put my business logic into the database by using stored procedures especially for manipulation(updating/inserting into multiple tables) of data. I am already using EJB to access data from the database. Is it possible to use EJB with stored procedures the same way namedSQLQueries are used? If yes please give me example ...

50. How can I use a remote bean in an entity with netbeans?    forums.netbeans.org

Hi. I'm a newbie in netbeans and J2EE. I'm trying to use a method of a remote stateless bean from an entity. I see that netbeans, when you are editing an entity code, allows you (right click -> enterprise resources -> Call enterprise bean) to create the lookup method that should allows you to use the remote bean methods. For example ...

51. New Entity Classes from DB - Slow scanning on large schema    forums.netbeans.org

When using the New Entity Classes from Database wizard (NB7), it scans for all tables that my account has access. For a small database this pick list of available tables can be handy. However the account I'm using has access to thousands of tables causing the wizard to take hours to load! Is there a way to specify the tables I ...

52. Entity Classes from Database Wizard - Issue with same table names in different PUs    forums.netbeans.org

I'm using the 'New Entity Classes from Database' Feature and have the following problem: I have one persistence.xml with 2 PUs. Each PU corresponds to a different database. However, I have a table with the same table name in both databases (eg. the table Categories is present in both databases) and due to this I cannot seem to create two 'Categories' ...

53. why am I getting extra Foo1 Entity classes created from "entity classes from db" tool    forums.netbeans.org

I'm really impressed with the JPA Entity classes created from a datamodel. In my case though, I'm noticing several extra classes created with an appended "1" in the class name. These classes seem to mirror the ones without the "1", but sometimes they have a few more collections added to them. Is there a reason these extra classes are generated? TIA ...

54. entity beans update    forums.netbeans.org

Hi all, I am working with EJB3 entity beans. generated by netbeans7.0. I have a couple of ejbFacades that inherit from AbstractFacade. There is a method edit() which basically calls the merge() method of persistence manager. The challenge is when call this method it tries to do an insert statement in mysql instead of update. This then gives an error that ...

57. NB 7.0.1 Entity Class from Database - PK generated wil @NotNull    forums.netbeans.org

giulio.alfieri Joined: 10 Aug 2011 Posts: 2 Posted: Mon Aug 22, 2011 6:19 pm Post subject: NB 7.0.1 Entity Class from Database - PK generated wil @NotNull Hi Guys, Probably this is a stupid question, but Im stuck on this for days. I've a simple table on MySQL 5.5 created by this SQL: Code: SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0; SET ...

58. not able to remove entity instance    forums.netbeans.org

I am not able to remove an instance from a one-to-many relationship. My entities are like this: customer owns orders (1 to n), order owns orderitems (1 to n), orderitem has product (1 to 1). I am able to remove customer, order and product. But when I remove orderitem it gives me "EntityNotFoundException: deleted entity passed to persist: "hifi.entity.OrderItem#]" Here is ...

59. Entity classes from (SQLite) DB - am I missing something obvious?    forums.netbeans.org

Hi, about a year ago I used netbeans' "generate Entity classes from database" feature successfully on a Derby database. The past week I've tried to do the same thing, this time using a SQLite database. Maybe I'm overlooking something obvious, but I can't get it to work this time. I'm using SQLite v. 3.7.6 and Netbeans 7.0.1, on OSX Lion, using ...

60. Entity Classes from DB fail in web app    forums.netbeans.org

Hello Iam working on a project where I Need to show some data result from my MS sql server on the web at "my" company. "new Entity Classes from Database" work 100 % from a normal Java App. and I can get all my table data as I want them. But when Iam doing the same on a Java web app ...

61. Entity Classes generated by NB contain @NotNull for @Id elements when strategy is IDENTITY    forums.netbeans.org

Has anyone else noticed that the latest versions of the ‘Entity classes from database’ wizard adds that @NotNull condition to the @Id element even when the generation strategy is IDENTITY? ← EXAMPLE ---------------------------- @Entity class contains (as generated by new wizard) @Id @GeneratedValue(strategy = GenerationType.IDENTITY) @Basic(optional = false) @NotNull @Column(name = "ID") private Integer id; where the dable definition contains `ID` ...

62. Problem with Entity Classes from Mysql Database    forums.netbeans.org

I have a problem while generating Entity Classes from a Database.The .sql script simply creates the tables(i have no errors there)but after generating the entity classes from that database and deploy my Webapp the following error occur: Exception Description: The @JoinColumns on the annotated element [field page] from the entity class [class EntityClasses.Post] is incomplete. When the source entity class uses ...

63. How to write entities to database @ startup in @ApplicationScoped    forums.netbeans.org

Basically just want one instance of a class to be created and when created to populate a database with entities. I think @ApplicationScoped is what I need to use (Seems this maybe preferred over @Singleton). This is what I've done so far - but doesn't work. I can definitely create the entities in a non @ApplicationScoped bean. Can anyone tell me ...

64. Problem entity class from database    forums.netbeans.org