Entity.save() implementation

0 views
Skip to first unread message

Vinay Sajip

unread,
Nov 19, 2009, 4:28:26 AM11/19/09
to SQLElixir
Because SQLA's session.save has been removed in trunk, Elixir's
entity.save gives an error if run with newer versions of SQLA. Is it
worth modifying Entity.save to do session.add() if not hasattr
(session, 'save')?

Regards,

Vinay Sajip

Gaetan de Menten

unread,
Nov 19, 2009, 10:34:24 AM11/19/09
to sqle...@googlegroups.com
I'm undecided on this issue... On one hand, I'd like to stay as close
to SA as possible (otherwise people get confused if thing are named
differently) and here the new SA name "add" doesn't sound good on a
class, so I'm against adding it. For now, I've taken the stance that
the methods stayed there for those using an old version of SA, but
people using a recent version of SA should use the new paradigm:
session.add(x).

If enough people agree with you that save needs to be kept for the
foreseeable future, then I'll fix it. In the meantime, you can use
your own base class with whatever method you want on it, including a
"fixed" save if you want.
--
Gaëtan de Menten
http://openhex.org
Reply all
Reply to author
Forward
0 new messages