Hi,
is there a way to test Elixir Entity's definition against a DB?
I'm using Elixir for rewriting a legacy software with a legacy oracle DB.
I have a table with these fields:
sessionNumber PK
valueType PK
value
now, i made a mistake and written my Entity like this:
this is from my memory and my contain syntax mistakes
class sessionValue(Entity):
_table_= 'SessionValues'
theValue = Field(Integer ,primary_key=True, columnName='value')
session =
ManyToOne('Session', primary_key=True,columnName= 'sessionNumber')
type = ManyToOne('ValueType',columnName='valueType')
as you see i my mistake was misplacing the primary_keys.
now my software worked "fine"
until I found out that if i have two rows in SessionValues:
1 , 2 ,3
1 , 3 ,3
then sessionValue.query.all() -> only one object! #because of the
primary_key mishap!
so... Hi,
is there a way to test Elixir Entity's definition against a DB? so in the
future i'll find out about this things sooner?
Thanks,
Yoav.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"SQLElixir" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/sqlelixir?hl=en
-~----------~----~----~----~------~----~------~--~---