Hey Koen,

I bypassed the issue. Basically I was wanting to query for the id number the 
entry when it was committed to have an unique ID for this that I could pass to 
3 other tables where more extensive data is kept. I was trying a typical 
(*i)->id, but that would fail as my database class lacked an id field, and I 
was thinking if i just defined it, by this I mean adding it to my class, it 
would see it. This did so definitively not work. The whole issue was the 
product of another group member panicking and asking me to do it this way. But 
now Im back to generating my own unique id, which was my plan all along. I 
guess I could have accessed the id entry by performing an execute() sql query, 
but at that point I was trying not to get involved with straight up sql queries 
and just stick to the Wt defined queries. I dont know if this made the issue 
any clearer, but I hope so, and my issue is resolved, so have a nice easter.

Regards,
Tor


15. apr. 2014 kl. 08:57 skrev Koen Deforche <k...@emweb.be>:

> Hey,
> 
> 2014-04-14 15:45 GMT+02:00 Muhammad Nasser Al-Noimi <mnno...@gmail.com>:
> Hi,
> 
> I did look for it in the documentation but no luck I think it's related to 
> the method: dbo::id(a, id, "id"); but I couldn't know how to re-define the ID 
> as auto-increment. Maybe it's in constraint? Can anyone comment about this? 
> Or if there is any way to get the ID value without re-define it it could work.
> 
> 
> 
> On 08/04/2014 01:15 م, Tor Arne Fallingen wrote:
>> Hey again,
>> 
>> I found the reason for my troubles; I wanted access to the automatically 
>> created id field in the database, so I defined it in my class as to be able 
>> to access it. It was fine as long as the tables was created already, but if 
>> I needed to create a new table, then I guess my defining the id field 
>> conflicted with the backends creating of the id field. So… I still need to 
>> have an auto incremented number that I can access, so Ill have to figure out 
>> either how to access the id field without having defined it, or make my own 
>> auto increment field. And any hints would be greatly appreciated.
> 
> Tor, I do not really understand what you're saying here. Either Wt::Dbo will 
> create the table (in which case there cannot be a conflict with an existing 
> table?) or Wt::Dbo uses your create table. But the latter case was the 
> situation you had previously and which gave no problems.
> 
> What do you mean with 'so Ill have to figure out either how to access the id 
> field without having defined it' : what does 'define' here mean?
> 
> Regards,
> koen
> ------------------------------------------------------------------------------
> Learn Graph Databases - Download FREE O'Reilly Book
> "Graph Databases" is the definitive new guide to graph databases and their
> applications. Written by three acclaimed leaders in the field,
> this first edition is now available. Download your free book today!
> http://p.sf.net/sfu/NeoTech_______________________________________________
> witty-interest mailing list
> witty-interest@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/witty-interest

Attachment: signature.asc
Description: Message signed with OpenPGP using GPGMail

------------------------------------------------------------------------------
Learn Graph Databases - Download FREE O'Reilly Book
"Graph Databases" is the definitive new guide to graph databases and their
applications. Written by three acclaimed leaders in the field,
this first edition is now available. Download your free book today!
http://p.sf.net/sfu/NeoTech
_______________________________________________
witty-interest mailing list
witty-interest@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/witty-interest

Reply via email to