can't create a new object [message #651481] |
Mon, 31 January 2011 10:41 |
Luiz E. Messages: 100 Registered: September 2010 |
Senior Member |
|
|
hi all
first, sorry about my english
i don't know if its a bug or not, but here's my problem: ig have these three classes:
Cliente: http://pastie.org/1501994 (yes, cliente has id, but is not shown)
GrupoTelefone: http://pastie.org/1501995
Telefone: http://pastie.org/1501996
when i try to save a NEW 'cliente', eclipselink says that the fields to insert on grupotelefone table is null..so, looking at the grupotelefone table, it has only an Id, which is referenced in other tables...but, being a new grupotelefone, he hasn't id (the database generates a new one) and this way, all the fields (only id) is null...
is there a configuration to disable this verification or something like?
thanks in advice
|
|
|
|
|
Re: can't create a new object [message #651545 is a reply to message #651481] |
Mon, 31 January 2011 15:44 |
|
I'm not sure it is possible to insert into a table with no columns in it, other than a generated id. Perhaps add another field, or do not use IDENTITY id generation, use TABLE or SEQUENCE instead.
I checked, and on MySQL at least an empty insert is possible with an identity column, so I think you are correct, and we should not be throwing this error. Please log a bug for this and vote for it.
James : Wiki : Book : Blog : Twitter
|
|
|
|
Powered by
FUDForum. Page generated in 0.05932 seconds